diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ee21d068b18e0c97.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ee21d068b18e0c97.pkl new file mode 100644 index 0000000000000000000000000000000000000000..d66f104fb7b1d1a3b2d9b138270bbb153c21db54 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ee21d068b18e0c97.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34c215577f5adb5fdda3ec9ea5b0d74a8e90e92def1ead71db20460b8f8eb7bf +size 1132 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_f8e1c41d13fc5151.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_f8e1c41d13fc5151.pkl new file mode 100644 index 0000000000000000000000000000000000000000..ab972b322eb35f7dde9f7c4025f55bf21a2dbcc8 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_f8e1c41d13fc5151.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4ef4fe98af409e5fdbdb58fe4bae87586a4982f12c43533627a6a4ab3b72f36 +size 572 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ff63c17652c0a791.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ff63c17652c0a791.pkl new file mode 100644 index 0000000000000000000000000000000000000000..897f64fcbd3d20f10fe6ac5ac4247b527ce5d531 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/1b29a86dc362ac03_ff63c17652c0a791.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e47ceac1a22a54f0e58bacfd0d9df3773d4686735ae1853ad5d37d634ff4842 +size 1905 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_31aa15f73170391d.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_31aa15f73170391d.pkl new file mode 100644 index 0000000000000000000000000000000000000000..39d5cfa14f7b7f66e5aa96f42edebbfaf59dd91a --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_31aa15f73170391d.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12c2a727d5580fb1a486d1d9b7e93d88db6221f0a4155751f3f42beeca8ffcb5 +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_40db5d89f4a76890.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_40db5d89f4a76890.pkl new file mode 100644 index 0000000000000000000000000000000000000000..9d6c35465c4a10c1b04d55e32728e1fd27086c93 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_40db5d89f4a76890.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd3d4a76e0d115a5cf48943552f715683898fbfb1b728d14fec9efd484e1b093 +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_542130a9a1fc9517.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_542130a9a1fc9517.pkl new file mode 100644 index 0000000000000000000000000000000000000000..837c07a276e015cab443573986eab8a3c7c170e9 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/2188f319fc725d97_542130a9a1fc9517.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d1ce1a50871eb84ae29f03f83f8a5f3c1e28e427fd9b32b605be2632f340335 +size 5408 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_31aa15f73170391d.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_31aa15f73170391d.pkl new file mode 100644 index 0000000000000000000000000000000000000000..7b01926c427a464a11271ee47094c32892860df2 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_31aa15f73170391d.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38a09784f5ce832c745100e76bc804ff0af23548e55e3f4bdf0cc4aab30e4f3e +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_3bacc14b9aed4e3c.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_3bacc14b9aed4e3c.pkl new file mode 100644 index 0000000000000000000000000000000000000000..6c9f149a6cfc95bc995e6f66d0edf9200a7b6d0d --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_3bacc14b9aed4e3c.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:157532dcbc2a2a77fe99ed78052ffd6836186c9ed7e9848c9d85293c367674ca +size 2271 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_40db5d89f4a76890.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_40db5d89f4a76890.pkl new file mode 100644 index 0000000000000000000000000000000000000000..668b67498e6412972800c9277f89f032de0d7dcd --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_40db5d89f4a76890.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4251638183289069c3b256775a96a575bbf5f7bc99f1fd61cc8bdace030aa3d +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_542130a9a1fc9517.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_542130a9a1fc9517.pkl new file mode 100644 index 0000000000000000000000000000000000000000..600ed6b51f3e78039ffc3a8414f94d408629dfd4 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_542130a9a1fc9517.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fe3736cc6aa1257092922cbe598e5201a5c29bc967ccc34ef439807f799d73a +size 1644 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57bd89636e69feec.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57bd89636e69feec.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2378d90703bde528dcbee867103c4ab67887b4a7 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57bd89636e69feec.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a47e837c88da483138709d25a5e2d169a809366802b93e60fde6f5640ecc4e8b +size 5953 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57c52e3d07a3871a.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57c52e3d07a3871a.pkl new file mode 100644 index 0000000000000000000000000000000000000000..51ed4108f6138050572a576813c587112ea3eaf8 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_57c52e3d07a3871a.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2ec8512587a7327c0d9ab7b74ab70da5e9a3a8ed23ce7fae38bef0c95faecd4 +size 602 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_6ac10c2a22026bea.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_6ac10c2a22026bea.pkl new file mode 100644 index 0000000000000000000000000000000000000000..450fa2d5fbf9cffcc30823fb953a5f16676f9fb1 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_6ac10c2a22026bea.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3902f3186d4377f0a3179aad9a56849d6f5c53ac5317db10a404cbe72b9323c7 +size 652 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_99bd397aecf47e45.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_99bd397aecf47e45.pkl new file mode 100644 index 0000000000000000000000000000000000000000..dafe29a1c751ab4f37466cdac3c58755aaa8bfd5 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_99bd397aecf47e45.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:579ea766b9dc39408d86ec1cf1f3431f57cbcb4a96e1a87f742609cd1a40cdfa +size 1509 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4346d3d5fea8cc3.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4346d3d5fea8cc3.pkl new file mode 100644 index 0000000000000000000000000000000000000000..92ff2a1ae8be09ef00ef036a2079efa4738017cc --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4346d3d5fea8cc3.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c25892b16a7572ba7e65d8288c116b90f101bb67c8dda22b0e52bc064aa8db40 +size 1702 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4458e6e7b8fc831.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4458e6e7b8fc831.pkl new file mode 100644 index 0000000000000000000000000000000000000000..9f320517cf7c67b6fd3a9eaaf172649119965743 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_d4458e6e7b8fc831.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b51005cfe113cd4c437da9f5f1051e032c87ae8f67ab4e848a6bb54595acef24 +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_db58dbb4a0d19a27.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_db58dbb4a0d19a27.pkl new file mode 100644 index 0000000000000000000000000000000000000000..834bc0afcd400dc29c5b374044223270d15d487a --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/398b1b539010b6c6_db58dbb4a0d19a27.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3421fda0b503c4d83e14c3911078d8fc0dc0d065e574ca92d5660ef852bc44a6 +size 2219 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_1a6c4a6782623fee.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_1a6c4a6782623fee.pkl new file mode 100644 index 0000000000000000000000000000000000000000..e78e63511414abf69246397486a4a1cedbb1de1f --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_1a6c4a6782623fee.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76d8f2a391c41f74200f738db252364883349f0457888b36b35454962dd3a2ac +size 1832 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_57bd89636e69feec.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_57bd89636e69feec.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f5243efbc50c2905003a670e99ee321d948266f1 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_57bd89636e69feec.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3abd6189dcdf58bfc49d6efcc6de2c41be9856696e74eab5fabc975459654564 +size 666 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_6ac10c2a22026bea.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_6ac10c2a22026bea.pkl new file mode 100644 index 0000000000000000000000000000000000000000..5c38683f5f740e520146f9aca8e0f4ad4e2ca757 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_6ac10c2a22026bea.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3aa1ee60ece7a548bc23c41156e7ad4754610031e50c3840452c72f280bdb1df +size 652 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_99bd397aecf47e45.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_99bd397aecf47e45.pkl new file mode 100644 index 0000000000000000000000000000000000000000..3f4cea323d714dbe0c746a8959a39db2bbd84301 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_99bd397aecf47e45.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c975608e2d97c1f2384cb73e172688cf1dcc2a8ea517324db5e171e4bdf64b9 +size 1504 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_b07ef38c33d262de.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_b07ef38c33d262de.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f02dc7624d626caa8c249c9e7e13afa41474ac1d --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_b07ef38c33d262de.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c498000cf959325521ffbc4e0dc223fdd1c797da734c600452eab83307b78a8 +size 3820 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_d4458e6e7b8fc831.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_d4458e6e7b8fc831.pkl new file mode 100644 index 0000000000000000000000000000000000000000..0fb3126a926f73923f0ab2cba8402808ce804b86 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_d4458e6e7b8fc831.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10f095e7e9dcae375585239e08219f9545c9d80eba4fe1f38535157866305be2 +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_db58dbb4a0d19a27.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_db58dbb4a0d19a27.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2eeeb86b843eddb2ec43d29812b3ee383c99e1d6 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_db58dbb4a0d19a27.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fde97a443e5ef26ac44d4b8238ff151ba95de326b945bb1fa78995975e41689e +size 1676 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_f8e1c41d13fc5151.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_f8e1c41d13fc5151.pkl new file mode 100644 index 0000000000000000000000000000000000000000..0d727001fc47c90a2cec057152cf7fe30a3f0816 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/842dec40f56d8968_f8e1c41d13fc5151.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87f7a4540efa555b320366cf100e9c01edbc8b2611ac984bddf1c60a5bf3b1b4 +size 572 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_284477e5e6d09eee.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_284477e5e6d09eee.pkl new file mode 100644 index 0000000000000000000000000000000000000000..22a3065cea164976a1f18aa0f84513fad10cd6b6 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_284477e5e6d09eee.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e7de1ba495dd2c638a94bba6f3fa75e07b192d46a00ba191fb84aad40babf19 +size 658 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_a3cdd8f4b8781118.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_a3cdd8f4b8781118.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2df7bcd9fb9f45f9a36f5c3790c77ba5c2cbcd48 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_a3cdd8f4b8781118.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f832e5f1339f281dd2d8962368bbdda2173937c07e8cf9f3da05c88d9322b869 +size 1101 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_ebea436cc0300e1e.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_ebea436cc0300e1e.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2404dd15d3c9eac17e9ffde5f94319be0cb5e552 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/b343314fb81d35d4_ebea436cc0300e1e.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7de6fe2dfd4d2d146bded6b6188105950238bdb0620f1ecbf6e7a0f7f06d0f22 +size 2972 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_5ba2665cec5ba095.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_5ba2665cec5ba095.pkl new file mode 100644 index 0000000000000000000000000000000000000000..a6c0cf8f521b0f513c3e1378c04462e7e112b1e1 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_5ba2665cec5ba095.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:672050d1c6c6c9c57b4c9b879994ec6922ccfd9ab3c398c0f4e872c524ed63cf +size 624 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_675c8c4d989cd122.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_675c8c4d989cd122.pkl new file mode 100644 index 0000000000000000000000000000000000000000..4b440b2d31baf5136551eecc637dc72cd86f9591 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_675c8c4d989cd122.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ece70ca8507ada0b7867e31a2c6b515409326e6c8f3b6ed0c57a581d6a86ed7 +size 588 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_ee21d068b18e0c97.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_ee21d068b18e0c97.pkl new file mode 100644 index 0000000000000000000000000000000000000000..a59bf0d9398132fef3b351daa63cd4edacf7ffae --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/c9086af32f3bc48e_ee21d068b18e0c97.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91790430ec5fd8fc216c32bf8e6a92bb2882aee23c95c44eda9dd8c1e495bb82 +size 1634 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_57bd89636e69feec.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_57bd89636e69feec.pkl new file mode 100644 index 0000000000000000000000000000000000000000..a6a57f8dce73220d315e4352c182563dc8e1f2c0 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_57bd89636e69feec.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbc6292214726014e3faeedde7e8740e846f97a5cf1e31495b62257af0328ad6 +size 1133 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6ac10c2a22026bea.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6ac10c2a22026bea.pkl new file mode 100644 index 0000000000000000000000000000000000000000..22815d02e6804cc38cf98e341b23747f4d1de17b --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6ac10c2a22026bea.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab10fa38d1f23df58765997653db4600b24c5c579a7602dcbb12e29202ddf003 +size 652 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6b5d930cc4fce363.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6b5d930cc4fce363.pkl new file mode 100644 index 0000000000000000000000000000000000000000..d48cb67dabf25c9d7dd4ff521cc9bfeafd21089d --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_6b5d930cc4fce363.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbe3695c502962d7a1b3f822b2a33c252d34e0c3d0514207f49c5a6d6c11b7b5 +size 4160 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_84dbe28012b8dbc0.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_84dbe28012b8dbc0.pkl new file mode 100644 index 0000000000000000000000000000000000000000..3e32958c674d12ba4d7e66be827e4eae1c33fdaf --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_84dbe28012b8dbc0.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5836e477d0f49f6f855f1c4af3f451dfc297eb12d5c426348f36254e8a78ab5d +size 1143 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_99bd397aecf47e45.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_99bd397aecf47e45.pkl new file mode 100644 index 0000000000000000000000000000000000000000..350a1a93d0bdfb8144a3f474288cf2027ec7f93b --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_99bd397aecf47e45.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af3cd7bbd6176bf30dec9d1d53e430b993d5afa1a2fe58bbf352d0d114c8b378 +size 1023 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_d4458e6e7b8fc831.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_d4458e6e7b8fc831.pkl new file mode 100644 index 0000000000000000000000000000000000000000..071c1161ca81e956f9b2fa7d9eae45291813a83e --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_d4458e6e7b8fc831.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3a5310c6a5d799e72102f126e5fafb97a9831fb2011435b38294dfdc4a4ba7e +size 612 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_db58dbb4a0d19a27.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_db58dbb4a0d19a27.pkl new file mode 100644 index 0000000000000000000000000000000000000000..360e3bfdc05d61da229e709b8fc4040c0ff8afd1 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_db58dbb4a0d19a27.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18cb513f3c206937b3b24c886ac52b892a08f7a84d06ec2c1dfc4e75bf2b86b6 +size 2219 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_ff63c17652c0a791.pkl b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_ff63c17652c0a791.pkl new file mode 100644 index 0000000000000000000000000000000000000000..1baafc5562983e876a29f031c2faffe395691674 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/fitness_cache/fd27b920de90c353_ff63c17652c0a791.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:070b1420ae53879fa9ac095c2ae62d751167c34c0b236d2f5f2355f95942cfc2 +size 600 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_0_prog_0.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_0_prog_0.json new file mode 100644 index 0000000000000000000000000000000000000000..0f6523ffdb00e7c03c134b0c4c5ba73890833e6e --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_0_prog_0.json @@ -0,0 +1,98 @@ +[ + 0.31134718785027904, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.3113 (agenteval 0.38, tokens 0.34, speed 0.08)", + "Commands": 6, + "ClassifiedFailures": 5, + "RecordedNotCharged": 0, + "EnvironmentFailures": 1, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 1\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=Massachusetts Avenue\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nCALL 3: CLASS E (environment)\n The agent ran: --json count -t address --in Cambridge, MA --where street=MASSACHUSETTS AVENUE\n Result: exit 1, stdout='', stderr='Traceback (most recent call last):\\n File \"\", line 198, in _run_module_as_main\\n File \"\", line 88, in _run_code\\n File \"/Users/priyangapkini/workspace/ar-c-new/botmap-oa-30'\n Evidence: network/data access failure, not a tool defect\n Missing behaviour: exclude this attempt from tool scoring; environment failed outside the CLI contract\nQuestion: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 2\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=Massachusetts Avenue\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nCALL 2: CLASS E (environment)\n The agent ran: addresses --in Cambridge, MA --street Massachusetts Ave -n 10\n Result: exit 1, stdout='', stderr='Traceback (most recent call last):\\n File \"\", line 198, in _run_module_as_main\\n File \"\", line 88, in _run_code\\n File \"/Users/priyangapkini/workspace/ar-c-new/botmap-oa-30'\n Evidence: network/data access failure, not a tool defect\n Missing behaviour: exclude this attempt from tool scoring; environment failed outside the CLI contract\nCALL 4: CLASS A (hard failure)\n The agent ran: --json count -t address --in Cambridge, MA --street Massachusetts Ave\n Result: exit 2, stdout='', stderr=\"Usage: python -m botmap count [OPTIONS]\\nTry 'python -m botmap count --help' for help.\\n\\nError: No such option: --street\\n\"\n Evidence: Usage: python -m botmap count [OPTIONS]\n Missing behaviour: refuse with a usable next action instead of leaving the agent stuck\nAgenteval correctness/recovery 0.38 vs 0.90 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_6_prog_2.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_6_prog_2.json new file mode 100644 index 0000000000000000000000000000000000000000..dd830bd14060e67054346775a13f77970bb67beb --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_6_prog_2.json @@ -0,0 +1,98 @@ +[ + 0.36131347438921657, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n#\n# Conventions used in this file:\n# * Build/output directories are ANCHORED to the repo root (\"/build/\" not\n# \"build/\") so an unanchored pattern can never silently swallow a package\n# directory, a docs folder, or a test fixture with the same name. An\n# accidentally-ignored source file is the worst outcome for this repo:\n# `botmap/cli.py` and `botmap/data/skill.md` are the tool's contract with\n# the agents that use it.\n# * Artifacts that the CLI's own documented examples write into the current\n# working directory (GeoJSON / JSONL / Parquet / .state sidecars) are\n# ignored, with explicit re-includes for the fixtures and examples that\n# ARE tracked. Running the README recipes or `just smoke-test` must never\n# leave the working tree dirty.\n\n# ---------------------------------------------------------------------------\n# Blocked work \u2014 files needed to fix the current eval failures\n#\n# The two scored regressions cannot be fixed from this file:\n# 1. `count ... --category bicycle_parking` returns 0 with no explanation\n# (Class C, \"silent wrong\"). The zero-result explainer currently lives\n# inline in the `places` command in cli.py and is not reachable from\n# `count`, `sample`, `roads`, `water`, `landuse`, or `addresses`.\n# 2. `where \"Reykjavik, Iceland\"` exits 1 because the divisions index stores\n# \"Reykjav\u00edk\" (diacritic) and there is no folding/transliteration step.\n#\n# Requesting the modules those fixes belong in (neither exists today):\nNEW FILE NEEDED: botmap/zero_results.py - shared \"why did this return 0 rows?\" explainer so count/sample/roads/water/landuse/addresses get the same near-match + probe suggestions that places already has, instead of an unexplained zero\nNEW FILE NEEDED: botmap/placenames.py - diacritic folding, transliteration, and endonym aliases (Reykjavik->Reykjav\u00edk, Tokyo->\u6771\u4eac\u90fd, Zurich->Z\u00fcrich) so place-name resolution stops hard-failing on the ASCII spelling an agent will type\n# ---------------------------------------------------------------------------\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging (anchored: never shadow a package directory)\n.Python\n/build/\n/develop-eggs/\n/dist/\n/downloads/\n/eggs/\n/.eggs/\n/lib/\n/lib64/\n/parts/\n/sdist/\n/var/\n/wheels/\n/share/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n/.cache/\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\n/cover/\n\n# Translations\n*.mo\n*.pot\n\n# Logs (agent/eval/CLI chatter). Tracked fixtures are re-included below.\n*.log\n!tests/**/*.log\n\n# Django stuff:\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\n/instance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\n/target/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\n/results/\n\n# macOS\n.DS_Store\n\n# ---------------------------------------------------------------------------\n# botmap output artifacts\n#\n# Every README / skill.md recipe and the CI smoke test write map data into the\n# current working directory (boston.geojson, brooklyn_coffee.jsonl,\n# tall.parquet, county.geojson, plus the `.state` sidecar written next to any\n# `-o` target). Ignore those so a doc walkthrough or an agent run never shows\n# up as an uncommitted change and never gets committed by accident.\n# ---------------------------------------------------------------------------\n*.geojson\n*.geojsonl\n*.geojsonseq\n*.jsonl\n*.parquet\n*.state\n*.gpkg\n*.fgb\n\n# ...but these are real, tracked repository content:\n!tests/**\n!benchmarks/**\n!botmap/examples/**\n!docs/**\n\n# Divisions index / cache, if XDG_CACHE_HOME is ever pointed inside the repo\n.cache/botmap/\ndivisions-index-*.parquet\n\n# Skill installed project-scope by `botmap install-skill` during agent runs.\n# (AGENTS.md is deliberately NOT ignored \u2014 a project may want to track the\n# generated section so agents pick the CLI up from the repo itself.)\n.claude/skills/botmap/\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.3613 (agenteval 0.38, tokens 0.55, speed 0.11)", + "Commands": 6, + "ClassifiedFailures": 6, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 1\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=Massachusetts Ave\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nQuestion: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 2\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=\"Massachusetts Ave\"\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nAgenteval correctness/recovery 0.38 vs 0.90 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_7_prog_3.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_7_prog_3.json new file mode 100644 index 0000000000000000000000000000000000000000..963e2cf38d405f04cdfd70eaf3ac6aaf0eb520e8 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_0/iter_7_prog_3.json @@ -0,0 +1,98 @@ +[ + 0.37446972543120066, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# CODEOWNERS \u2014 review routing for botmap\n#\n# botmap's primary user is an AI assistant that is handed a plain-English\n# question about maps and nothing else. Every file below is part of the\n# surface that assistant sees. Changes here are behaviour changes for that\n# assistant, so they get named owners and a hard review checklist.\n#\n# ---------------------------------------------------------------------------\n# AGENT-FACING INVARIANTS \u2014 reviewers MUST block any PR that violates these\n# ---------------------------------------------------------------------------\n# 1. No unexplained empty result. Zero rows must always be accompanied by a\n# stderr sentence saying WHY (wrong category value, place resolved to the\n# wrong region, bbox outside coverage) plus a concrete next command. An\n# assistant reads bare \"0\" as \"there are none\" and reports a wrong answer.\n# This is the worst failure mode in the system.\n# 2. No raw Python traceback ever reaches the user. Network/S3/urllib\n# failures (DNS, timeout, offline, 403) must be caught and re-emitted as\n# a one-line diagnosis + retry/offline advice. Observed regression:\n# `where \"Brooklyn, NY\"` dumping urllib.request internals on a network\n# blip, which the eval scored as a hard failure three times in a row.\n# 3. Unknown subcommand must suggest the closest real one. Observed\n# regression: `botmap building_parts --in \"Cambridge, MA\"` exiting 2 with\n# \"No such command\" and no pointer to `download -t building_part` /\n# `buildings`. Every \"No such command\" path must name a runnable\n# replacement.\n# 4. Unresolvable place names must not dead-end. `where \"Reykjavik, Iceland\"`\n# returning no_match with only generic advice was scored a hard failure in\n# both repeats. A no-match must (a) retry with qualifiers dropped and with\n# country-name -> alpha-2 normalisation, (b) offer local-script/alternate\n# spellings, and (c) print a ready-to-run `--bbox` or `containing LAT,LON`\n# fallback with real numbers where one can be derived.\n# 5. Accept the obvious spelling as well as the official one: singular and\n# plural verbs, underscores and hyphens, `--type`/`-t` values with or\n# without the theme prefix. Aliases are cheap; a wrong first try that\n# cannot become a right second try is not.\n# 6. Every error message names the problem AND gives a copy-pasteable\n# replacement command. \"See --help\" is not a replacement command.\n# 7. stdout is data, stderr is for the human/agent. No diagnostics on stdout.\n# 8. New capability is not shipped until it is discoverable: `capabilities`,\n# `--help`, README, and botmap/data/skill.md must be updated in the same\n# PR, or an assistant will never find it.\n#\n# ---------------------------------------------------------------------------\n# Ownership\n# ---------------------------------------------------------------------------\n\n# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n\n# --- Command surface: what the assistant can discover and run ---------------\n# Verb names, aliases, unknown-command suggestions, error text, zero-result\n# hints, and the `capabilities` manifest all live here. Review against\n# invariants 1, 3, 5, 6, 7, 8.\n/botmap/cli.py @overturemaps/omf-public-reviewers\n/botmap/intents.py @overturemaps/omf-public-reviewers\n/botmap/introspection.py @overturemaps/omf-public-reviewers\n\n# --- Place-name resolution -------------------------------------------------\n# Qualifier normalisation, country/state aliases, parent fallback, ambiguity\n# warnings. Review against invariants 1 and 4.\n/botmap/geocoding.py @overturemaps/omf-public-reviewers\n/botmap/cache.py @overturemaps/omf-public-reviewers\n\n# --- Filters ---------------------------------------------------------------\n# --where parsing and schema validation. Errors must explain the shell\n# redirection trap and list available fields. Review against invariant 6.\n/botmap/filters.py @overturemaps/omf-public-reviewers\n\n# --- Network / data access -------------------------------------------------\n# STAC catalog, S3 reads, GERS lookup. Any exception escaping this layer as a\n# traceback is a blocking review comment. Review against invariant 2.\n/botmap/core.py @overturemaps/omf-public-reviewers\n/botmap/changelog.py @overturemaps/omf-public-reviewers\n/botmap/releases.py @overturemaps/omf-public-reviewers\n\n# --- Agent documentation shipped with the package --------------------------\n# skill.md is the assistant's de-facto manual; it must be updated in lockstep\n# with cli.py. A new verb with no skill.md recipe is invisible.\n/botmap/data/skill.md @overturemaps/omf-public-reviewers\n/botmap/skill_installer.py @overturemaps/omf-public-reviewers\n/README.md @overturemaps/omf-public-reviewers\n/SPEC.md @overturemaps/omf-public-reviewers\n\n# --- Regression guards for the failures above ------------------------------\n# Any PR touching cli.py, geocoding.py, or core.py should add or update a test\n# here proving the new path yields a named problem + runnable replacement.\n/tests/** @overturemaps/omf-public-reviewers\n/docs/automated-improvements/** @overturemaps/omf-public-reviewers\n\n# ---------------------------------------------------------------------------\n# Files I need in order to fix the eval failures properly, rather than\n# cramming this logic into cli.py:\n#\n# NEW FILE NEEDED: botmap/suggest.py - unknown-subcommand and unknown-verb suggestion plus a verb/type alias table (building_parts -> building_part, plural/singular, hyphen/underscore); this does not belong inline in cli.py\n# NEW FILE NEEDED: botmap/errors.py - one place to turn network/S3/urllib exceptions into a one-line diagnosis + retry advice so no traceback ever reaches the user\n# NEW FILE NEEDED: botmap/placenames.py - country/city name normalisation and local-script fallbacks (Reykjavik -> Reykjav\u00edk, \"X, Iceland\" -> \"X, IS\") kept out of geocoding.py's index logic\n# ---------------------------------------------------------------------------", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.3745 (agenteval 0.38, tokens 0.46, speed 0.29)", + "Commands": 6, + "ClassifiedFailures": 6, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 1\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=Massachusetts Ave\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nCALL 3: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=Massachusetts Avenue\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nQuestion: \"How many street addresses are on Massachusetts Avenue in Cambridge, MA?\"\nQUESTION street-canonical-form repeat 2\nCALL 1: CLASS C (silent wrong) - c-unknown\n The agent ran: --json count -t address --in Cambridge, MA --where street=\"Massachusetts Avenue\"\n Result: exit 0, stdout='{\\n \"type\": \"address\",\\n \"bbox\": [\\n -71.160400390625,\\n 42.35240173339844,\\n -71.06397247314453,\\n 42.40426254272461\\n ],\\n \"where\": [\\n {\\n \"key\": \"street\",\\n \"op\": \"=\",\\n \"val', stderr=''\n Evidence: empty result with no conclusive probe; reason unknown\n Missing behaviour: say that zero is unexplained and surface safe discovery probes\nAgenteval correctness/recovery 0.38 vs 0.90 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_0_prog_0.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_0_prog_0.json new file mode 100644 index 0000000000000000000000000000000000000000..73ea208c8ca825df1831396015b3081618c2f350 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_0_prog_0.json @@ -0,0 +1,98 @@ +[ + 0.5852731858971623, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.5853 (agenteval 0.76, tokens 0.47, speed 0.18)", + "Commands": 4, + "ClassifiedFailures": 4, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"List the pharmacies in Monaco.\"\nQUESTION pharmacies-monaco repeat 1\nCALL 1: CLASS A (hard failure)\n The agent ran: --json count -t place --in Monaco, MC --where categories.primary=pharmacy\n Result: exit 2, stdout='', stderr=\"Usage: python -m botmap count [OPTIONS]\\nTry 'python -m botmap count --help' for help.\\n\\nError: No division found for 'Monaco, MC'. The qualifier 'MC' matched nothing, but 'Monaco' alone resolves to Mon\"\n Evidence: Usage: python -m botmap count [OPTIONS]\n Missing behaviour: refuse with a usable next action instead of leaving the agent stuck\nQuestion: \"List the pharmacies in Monaco.\"\nQUESTION pharmacies-monaco repeat 2\nNo classified failures.\nAgenteval correctness/recovery 0.76 vs 1.00 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_7_prog_3.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_7_prog_3.json new file mode 100644 index 0000000000000000000000000000000000000000..b659cf89e88febe886c10b08f6f1994fbe5f31ed --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_1/iter_7_prog_3.json @@ -0,0 +1,98 @@ +[ + 0.5993198537419527, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# CODEOWNERS \u2014 review routing for botmap\n#\n# botmap's primary user is an AI assistant that is handed a plain-English\n# question about maps and nothing else. Every file below is part of the\n# surface that assistant sees. Changes here are behaviour changes for that\n# assistant, so they get named owners and a hard review checklist.\n#\n# ---------------------------------------------------------------------------\n# AGENT-FACING INVARIANTS \u2014 reviewers MUST block any PR that violates these\n# ---------------------------------------------------------------------------\n# 1. No unexplained empty result. Zero rows must always be accompanied by a\n# stderr sentence saying WHY (wrong category value, place resolved to the\n# wrong region, bbox outside coverage) plus a concrete next command. An\n# assistant reads bare \"0\" as \"there are none\" and reports a wrong answer.\n# This is the worst failure mode in the system.\n# 2. No raw Python traceback ever reaches the user. Network/S3/urllib\n# failures (DNS, timeout, offline, 403) must be caught and re-emitted as\n# a one-line diagnosis + retry/offline advice. Observed regression:\n# `where \"Brooklyn, NY\"` dumping urllib.request internals on a network\n# blip, which the eval scored as a hard failure three times in a row.\n# 3. Unknown subcommand must suggest the closest real one. Observed\n# regression: `botmap building_parts --in \"Cambridge, MA\"` exiting 2 with\n# \"No such command\" and no pointer to `download -t building_part` /\n# `buildings`. Every \"No such command\" path must name a runnable\n# replacement.\n# 4. Unresolvable place names must not dead-end. `where \"Reykjavik, Iceland\"`\n# returning no_match with only generic advice was scored a hard failure in\n# both repeats. A no-match must (a) retry with qualifiers dropped and with\n# country-name -> alpha-2 normalisation, (b) offer local-script/alternate\n# spellings, and (c) print a ready-to-run `--bbox` or `containing LAT,LON`\n# fallback with real numbers where one can be derived.\n# 5. Accept the obvious spelling as well as the official one: singular and\n# plural verbs, underscores and hyphens, `--type`/`-t` values with or\n# without the theme prefix. Aliases are cheap; a wrong first try that\n# cannot become a right second try is not.\n# 6. Every error message names the problem AND gives a copy-pasteable\n# replacement command. \"See --help\" is not a replacement command.\n# 7. stdout is data, stderr is for the human/agent. No diagnostics on stdout.\n# 8. New capability is not shipped until it is discoverable: `capabilities`,\n# `--help`, README, and botmap/data/skill.md must be updated in the same\n# PR, or an assistant will never find it.\n#\n# ---------------------------------------------------------------------------\n# Ownership\n# ---------------------------------------------------------------------------\n\n# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n\n# --- Command surface: what the assistant can discover and run ---------------\n# Verb names, aliases, unknown-command suggestions, error text, zero-result\n# hints, and the `capabilities` manifest all live here. Review against\n# invariants 1, 3, 5, 6, 7, 8.\n/botmap/cli.py @overturemaps/omf-public-reviewers\n/botmap/intents.py @overturemaps/omf-public-reviewers\n/botmap/introspection.py @overturemaps/omf-public-reviewers\n\n# --- Place-name resolution -------------------------------------------------\n# Qualifier normalisation, country/state aliases, parent fallback, ambiguity\n# warnings. Review against invariants 1 and 4.\n/botmap/geocoding.py @overturemaps/omf-public-reviewers\n/botmap/cache.py @overturemaps/omf-public-reviewers\n\n# --- Filters ---------------------------------------------------------------\n# --where parsing and schema validation. Errors must explain the shell\n# redirection trap and list available fields. Review against invariant 6.\n/botmap/filters.py @overturemaps/omf-public-reviewers\n\n# --- Network / data access -------------------------------------------------\n# STAC catalog, S3 reads, GERS lookup. Any exception escaping this layer as a\n# traceback is a blocking review comment. Review against invariant 2.\n/botmap/core.py @overturemaps/omf-public-reviewers\n/botmap/changelog.py @overturemaps/omf-public-reviewers\n/botmap/releases.py @overturemaps/omf-public-reviewers\n\n# --- Agent documentation shipped with the package --------------------------\n# skill.md is the assistant's de-facto manual; it must be updated in lockstep\n# with cli.py. A new verb with no skill.md recipe is invisible.\n/botmap/data/skill.md @overturemaps/omf-public-reviewers\n/botmap/skill_installer.py @overturemaps/omf-public-reviewers\n/README.md @overturemaps/omf-public-reviewers\n/SPEC.md @overturemaps/omf-public-reviewers\n\n# --- Regression guards for the failures above ------------------------------\n# Any PR touching cli.py, geocoding.py, or core.py should add or update a test\n# here proving the new path yields a named problem + runnable replacement.\n/tests/** @overturemaps/omf-public-reviewers\n/docs/automated-improvements/** @overturemaps/omf-public-reviewers\n\n# ---------------------------------------------------------------------------\n# Files I need in order to fix the eval failures properly, rather than\n# cramming this logic into cli.py:\n#\n# NEW FILE NEEDED: botmap/suggest.py - unknown-subcommand and unknown-verb suggestion plus a verb/type alias table (building_parts -> building_part, plural/singular, hyphen/underscore); this does not belong inline in cli.py\n# NEW FILE NEEDED: botmap/errors.py - one place to turn network/S3/urllib exceptions into a one-line diagnosis + retry advice so no traceback ever reaches the user\n# NEW FILE NEEDED: botmap/placenames.py - country/city name normalisation and local-script fallbacks (Reykjavik -> Reykjav\u00edk, \"X, Iceland\" -> \"X, IS\") kept out of geocoding.py's index logic\n# ---------------------------------------------------------------------------", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.5993 (agenteval 0.76, tokens 0.47, speed 0.25)", + "Commands": 3, + "ClassifiedFailures": 3, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"List the pharmacies in Monaco.\"\nQUESTION pharmacies-monaco repeat 1\nCALL 1: CLASS A (hard failure)\n The agent ran: places --in Monaco, MC --category pharmacy -f geojsonseq\n Result: exit 2, stdout='', stderr=\"Usage: python -m botmap places [OPTIONS]\\nTry 'python -m botmap places --help' for help.\\n\\nError: No division found for 'Monaco, MC'. The qualifier 'MC' matched nothing, but 'Monaco' alone resolves to M\"\n Evidence: Usage: python -m botmap places [OPTIONS]\n Missing behaviour: refuse with a usable next action instead of leaving the agent stuck\nQuestion: \"List the pharmacies in Monaco.\"\nQUESTION pharmacies-monaco repeat 2\nNo classified failures.\nAgenteval correctness/recovery 0.76 vs 1.00 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_2/iter_0_prog_0.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_2/iter_0_prog_0.json new file mode 100644 index 0000000000000000000000000000000000000000..f0344dd804b75f65c2a749d70594b4dff9f059e9 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_2/iter_0_prog_0.json @@ -0,0 +1,98 @@ +[ + 0.8157275694683133, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.8157 (agenteval 1.00, tokens 0.70, speed 0.37)", + "Commands": 5, + "ClassifiedFailures": 5, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"Find hardware stores within 200m of a bike path in Cambridge, Massachusetts.\"\nQUESTION hardware-near-bikepaths repeat 1\nNo classified failures.\nQuestion: \"Find hardware stores within 200m of a bike path in Cambridge, Massachusetts.\"\nQUESTION hardware-near-bikepaths repeat 2\nNo classified failures.\nAgenteval correctness/recovery 1.00 vs 1.00 before the change (unchanged).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_3/iter_0_prog_0.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_3/iter_0_prog_0.json new file mode 100644 index 0000000000000000000000000000000000000000..bf782fea6f5d1e3d1247207795d0e15784800bd9 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_3/iter_0_prog_0.json @@ -0,0 +1,98 @@ +[ + 0.8279580379044169, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.8280 (agenteval 1.00, tokens 0.60, speed 0.54)", + "Commands": 0, + "ClassifiedFailures": 0, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"Find highly rated coffee shops near me that are open right now.\"\nQUESTION unsupported-hours-and-ratings repeat 1\nNo classified failures.\nQuestion: \"Find highly rated coffee shops near me that are open right now.\"\nQUESTION unsupported-hours-and-ratings repeat 2\nNo classified failures.\nAgenteval correctness/recovery 1.00 vs 1.00 before the change (unchanged).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_0_prog_0.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_0_prog_0.json new file mode 100644 index 0000000000000000000000000000000000000000..4dcdb21af7419b3e87ae8370abb245a82fec1f78 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_0_prog_0.json @@ -0,0 +1,98 @@ +[ + 0.34189245366706533, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.3419 (agenteval 0.50, tokens 0.09, speed 0.12)", + "Commands": 0, + "ClassifiedFailures": 0, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 1\nNo classified failures.\nQuestion: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 2\nNo classified failures.\nAgenteval correctness/recovery 0.50 vs 1.00 before the change (worse).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_3_prog_1.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_3_prog_1.json new file mode 100644 index 0000000000000000000000000000000000000000..6ccc4223a50f066c6ec6a584882492e45c1501f6 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_3_prog_1.json @@ -0,0 +1,98 @@ +[ + 0.7037612803793193, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\n#\n# botmap is an agent-facing CLI: its primary user is an LLM assistant that is handed a\n# plain-English question and must derive the right command unaided. Two artifacts decide\n# whether that works: (a) the bundled Skill (botmap/data/skill.md), which is how an agent\n# discovers the verbs at all, and (b) the `capabilities` manifest, which is how an agent\n# self-describes the surface at runtime. Both are easy to break silently in a wheel.\n# This workflow therefore gates publication on an agent-usability guard, and reports\n# (without blocking) on the argument spellings agents are observed to reach for first.\nname: Publish botmap\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n outputs:\n version: ${{ steps.version.outputs.version }}\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Read package version\n id: version\n shell: bash\n run: |\n set -euo pipefail\n VERSION=$(uv run --no-project python - <<'PY'\n import re, pathlib\n text = pathlib.Path(\"pyproject.toml\").read_text()\n m = re.search(r'^version\\s*=\\s*\"([^\"]+)\"', text, re.M)\n print(m.group(1))\n PY\n )\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n echo \"Package version: ${VERSION}\"\n\n - name: Check release tag matches package version\n if: github.event_name == 'release'\n shell: bash\n env:\n TAG: ${{ github.ref_name }}\n VERSION: ${{ steps.version.outputs.version }}\n run: |\n set -euo pipefail\n NORMALIZED=\"${TAG#v}\"\n if [ \"$NORMALIZED\" != \"$VERSION\" ]; then\n echo \"::error::Release tag '${TAG}' does not match pyproject version '${VERSION}'.\"\n echo \"Fix: bump 'version' in pyproject.toml to ${NORMALIZED}, or retag the release as v${VERSION}.\"\n exit 1\n fi\n echo \"Tag ${TAG} matches version ${VERSION}.\"\n\n # The Skill is how an agent discovers this CLI at all. A wheel that omits it\n # publishes a tool no assistant can find, so treat its absence as fatal.\n - name: Verify the agent Skill is packaged in the wheel\n shell: bash\n run: |\n set -euo pipefail\n WHEEL=$(ls dist/*.whl | head -n 1)\n echo \"Inspecting ${WHEEL}\"\n if ! unzip -l \"$WHEEL\" | grep -q 'botmap/data/skill.md'; then\n echo \"::error::botmap/data/skill.md is missing from ${WHEEL}.\"\n echo \"Without it, 'botmap install-skill' installs nothing and agents cannot discover the verbs.\"\n echo \"Fix: ensure [tool.hatch.build.targets.wheel] packages = [\\\"botmap\\\"] includes the data dir.\"\n exit 1\n fi\n echo \"Skill file present.\"\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n agent-usability-guard:\n name: Agent-usability guard\n needs: build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install the built wheel into a clean venv\n shell: bash\n run: |\n set -euo pipefail\n WHEEL=$(ls dist/*.whl | head -n 1)\n uv venv .verify\n uv pip install --python .verify/bin/python \"$WHEEL\"\n echo \"VERIFY_PY=$PWD/.verify/bin/python\" >> \"$GITHUB_ENV\"\n\n - name: CLI starts and prints help\n shell: bash\n run: |\n set -euo pipefail\n \"$VERIFY_PY\" -m botmap --help > /dev/null\n \"$VERIFY_PY\" -m botmap --version\n\n # An assistant that has forgotten the surface runs `--json capabilities`.\n # If that manifest is incomplete, the assistant falls back to the bulk\n # `download` escape hatch, which is the worst outcome we measure.\n - name: Capabilities manifest is complete and self-describing\n shell: bash\n run: |\n set -euo pipefail\n \"$VERIFY_PY\" -m botmap --json capabilities > capabilities.json\n \"$VERIFY_PY\" - <<'PY'\n import json, sys\n\n data = json.load(open(\"capabilities.json\"))\n commands = {c[\"name\"]: c for c in data[\"commands\"]}\n\n # Verbs an assistant is expected to reach for straight from a\n # plain-English question. Any missing entry means the question-shaped\n # path is undiscoverable and `download` becomes the default answer.\n required = [\n \"where\", \"boundary\", \"count\", \"sample\",\n \"places\", \"buildings\", \"roads\", \"addresses\", \"water\", \"landuse\",\n \"at\", \"containing\",\n \"themes\", \"types\", \"schema\", \"categories\", \"capabilities\",\n \"install-skill\", \"download\",\n ]\n missing = [name for name in required if name not in commands]\n if missing:\n sys.exit(f\"capabilities manifest is missing commands: {missing}\")\n\n undocumented = sorted(\n name for name, cmd in commands.items() if not (cmd.get(\"help\") or \"\").strip()\n )\n if undocumented:\n sys.exit(\n \"every command needs a one-line help string an agent can read; \"\n f\"missing help for: {undocumented}\"\n )\n\n # Location arguments are what turn a place name into a query. Each\n # data verb must accept at least one of --in / --bbox / a positional.\n location_verbs = [\n \"places\", \"buildings\", \"roads\", \"addresses\", \"water\", \"landuse\",\n \"count\", \"sample\",\n ]\n for name in location_verbs:\n flags = {\n flag\n for param in commands[name][\"params\"]\n for flag in param.get(\"flags\", [])\n }\n if not ({\"--in\", \"--bbox\"} & flags):\n sys.exit(f\"{name} accepts neither --in nor --bbox\")\n\n print(f\"capabilities OK: {len(commands)} commands, all documented\")\n PY\n\n - name: Discovery commands are machine-readable\n shell: bash\n run: |\n set -euo pipefail\n for cmd in themes types; do\n \"$VERIFY_PY\" -m botmap --json \"$cmd\" > \"${cmd}.json\"\n \"$VERIFY_PY\" -c \"import json,sys; d=json.load(open('${cmd}.json')); sys.exit('empty ${cmd}') if not d else print('${cmd}: %d entries' % len(d))\"\n done\n\n - name: Installed Skill is readable and non-trivial\n shell: bash\n run: |\n set -euo pipefail\n \"$VERIFY_PY\" - <<'PY'\n from importlib import resources\n import sys\n\n text = (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n if len(text) < 1000:\n sys.exit(\"skill.md looks truncated\")\n for marker in (\"name: botmap\", \"When to reach for this CLI\", \"Anti-patterns\"):\n if marker not in text:\n sys.exit(f\"skill.md is missing the {marker!r} section\")\n print(f\"skill.md OK ({len(text)} chars)\")\n PY\n\n - name: install-skill writes a discoverable Skill\n shell: bash\n run: |\n set -euo pipefail\n WORK=$(mktemp -d)\n cd \"$WORK\"\n HOME=\"$WORK\" \"$VERIFY_PY\" -m botmap install-skill --target claude-user --yes\n test -s \"$WORK/.claude/skills/botmap/SKILL.md\"\n HOME=\"$WORK\" \"$VERIFY_PY\" -m botmap install-skill --target agents-md --yes\n grep -q 'botmap:start' AGENTS.md\n echo \"install-skill OK\"\n\n # Hard failures must still teach. Every non-zero exit an assistant can\n # trigger from a first guess should name a runnable replacement, so the\n # wrong first try becomes a correct second try.\n - name: Errors carry a runnable next action\n shell: bash\n run: |\n set -euo pipefail\n fail=0\n\n expect_suggestion() {\n local label=\"$1\"; shift\n local out\n out=$(\"$VERIFY_PY\" -m botmap \"$@\" 2>&1 || true)\n if printf '%s' \"$out\" | grep -Eq '(botmap [a-z-]+|--bbox|--in |--help)'; then\n echo \"ok ${label}\"\n else\n echo \"::error::${label}: error output offers no next action\"\n printf '%s\\n' \"$out\" | sed 's/^/ /'\n fail=1\n fi\n }\n\n # A place name that is not in the divisions index.\n expect_suggestion \"unknown place\" where \"Zzzqxville, ZZ\"\n # A boundary polygon requested through the retired path.\n expect_suggestion \"division_area redirect\" download -t division_area -f geojsonseq --bbox -71.07,42.35,-71.06,42.36\n # An attribute filter whose operator the shell ate.\n expect_suggestion \"operator-less --where\" count -t building --bbox -71.07,42.35,-71.06,42.36 --where height\n # A verb invoked without any spatial bound.\n expect_suggestion \"unbounded addresses\" addresses --street Main -f geojsonseq\n # categories on a type whose classifying field is `class`.\n expect_suggestion \"categories on land_use\" categories -t land_use --bbox -71.07,42.35,-71.06,42.36\n\n exit \"$fail\"\n\n # Advisory, non-blocking: the argument spellings assistants are observed\n # to try first. Each line that reports FIRST-TRY MISS is a concrete\n # candidate for accepting the obvious spelling alongside the official one.\n - name: Report first-try spellings assistants reach for\n continue-on-error: true\n shell: bash\n run: |\n set -uo pipefail\n miss=0\n\n probe() {\n local label=\"$1\"; shift\n local out rc\n out=$(\"$VERIFY_PY\" -m botmap \"$@\" 2>&1); rc=$?\n if printf '%s' \"$out\" | grep -q 'No such option'; then\n echo \"FIRST-TRY MISS ${label}\"\n printf '%s\\n' \"$out\" | grep 'No such option' | sed 's/^/ /'\n miss=$((miss + 1))\n else\n echo \"accepted ${label} (exit ${rc})\"\n fi\n }\n\n # \"roads near this point\" -> --class on the proximity primitive\n probe 'at ... -t segment --class motorway' \\\n at 42.3601,-71.0589 -t segment --radius 300 --class motorway -n 1\n # negative longitude first, so the coordinate looks like an option\n probe 'containing -71.09,42.39 (leading minus)' \\\n containing -71.0912,42.3959\n # trailing --json appended out of habit on a data verb\n probe 'at ... --json' \\\n at 42.3601,-71.0589 -t place -n 1 --json\n # -o on a metadata command that already writes to stdout\n probe 'where ... --geometry -o FILE' \\\n where \"Boston, MA\" --geometry -o /tmp/boundary.geojson\n # short radius flag on a proximity query\n probe 'at ... -r 300 (radius, not release)' \\\n at 42.3601,-71.0589 -t place -r 300 -n 1\n\n echo\n echo \"first-try misses: ${miss}\"\n if [ \"$miss\" -gt 0 ]; then\n echo \"Each miss above is an accepted-spelling gap: teach the flag, or reject it\"\n echo \"with a message naming the exact replacement command.\"\n fi\n exit 0\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: [build, agent-usability-guard]\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n\n rollup-publish-status:\n name: Check publish results\n if: always()\n needs: [build, agent-usability-guard, publish]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.7038 (agenteval 1.00, tokens 0.29, speed 0.23)", + "Commands": 0, + "ClassifiedFailures": 0, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 1\nNo classified failures.\nQuestion: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 2\nNo classified failures.\nAgenteval correctness/recovery 1.00 vs 1.00 before the change (unchanged).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_7_prog_3.json b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_7_prog_3.json new file mode 100644 index 0000000000000000000000000000000000000000..eaadcc38f414d77c3c9e93851d645af06b7f9c5a --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/generated_best_outputs_valset/task_4/iter_7_prog_3.json @@ -0,0 +1,98 @@ +[ + 0.7492258787263637, + { + ".github/dependabot.yml": "---\nversion: 2\nupdates:\n\n # Maintain GitHub Actions dependencies\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n open-pull-requests-limit: 5\n groups:\n actions:\n patterns:\n - \"actions/*\"\n labels:\n - \"bot\"\n commit-message:\n prefix: \"[CHORE](deps)\"\n include: \"scope\"\n cooldown:\n default-days: 7\n", + ".github/workflows/build-binaries.yml": "---\n# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows.\n# On release: attaches binaries directly to the GitHub Release as assets.\n# On workflow_dispatch: uploads binaries as workflow artifacts for inspection.\nname: Build Binaries\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # default; job overrides to write for release asset upload\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build ${{ matrix.target }}\n runs-on: ${{ matrix.os }}\n permissions:\n contents: write # required to upload release assets via gh release upload\n strategy:\n fail-fast: false\n matrix:\n include:\n - os: ubuntu-latest\n target: linux-x86_64\n ext: \"\"\n - os: macos-latest\n target: macos-arm64\n ext: \"\"\n - os: macos-26-intel\n target: macos-x86_64\n ext: \"\"\n - os: windows-latest\n target: windows-x86_64\n ext: \".exe\"\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Install dependencies\n run: uv sync --group binary\n\n - name: Get version\n id: version\n shell: bash\n run: |\n VERSION=$(uv run python -c \"from importlib.metadata import version; print(version('botmap'))\")\n echo \"version=${VERSION}\" >> \"$GITHUB_OUTPUT\"\n\n - name: Build binary\n run: >-\n uv run pyinstaller\n --onefile\n --name botmap\n --collect-all pyarrow\n --collect-all shapely\n --collect-data pyfiglet\n botmap/__main__.py\n\n - name: Rename binary\n shell: bash\n env:\n VERSION: ${{ steps.version.outputs.version }}\n TARGET: ${{ matrix.target }}\n EXT: ${{ matrix.ext }}\n run: |\n SRC=\"dist/botmap${EXT}\"\n DST=\"dist/botmap-${VERSION}-${TARGET}${EXT}\"\n mv \"$SRC\" \"$DST\"\n echo \"BINARY_PATH=${DST}\" >> \"$GITHUB_ENV\"\n\n - name: Smoke test binary\n shell: bash\n run: |\n \"$BINARY_PATH\" --help\n\n - name: Upload to release\n if: github.event_name == 'release'\n shell: bash\n env:\n GH_TOKEN: ${{ github.token }}\n TAG: ${{ github.ref_name }}\n run: gh release upload \"$TAG\" \"$BINARY_PATH\" --clobber\n\n - name: Upload artifact (dry run)\n if: github.event_name == 'workflow_dispatch'\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: botmap-${{ matrix.target }}\n path: ${{ env.BINARY_PATH }}\n if-no-files-found: error\n", + ".github/workflows/publish-pypi.yml": "---\n# Publishes the botmap package in two scenarios:\n# 1. Release (production): triggered when a GitHub Release is published \u2192 publishes to PyPI.\n# 2. Dry-run: triggered manually via workflow_dispatch \u2192 publishes to Test PyPI to verify\n# the build and publish pipeline end-to-end without affecting the production package index.\n# Uses OIDC trusted publishing \u2014 no API token required.\nname: Publish overturemaps-py\n\non:\n release:\n types: [published]\n workflow_dispatch:\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n\n - name: Build package\n run: uv build\n\n - name: Upload dist artifacts\n uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1\n with:\n name: dist\n path: dist/\n\n publish:\n name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}'\n needs: build\n runs-on: ubuntu-latest\n environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }}\n env:\n TEST_PYPI_URL: https://test.pypi.org/legacy/\n permissions:\n id-token: write # OIDC \u2014 required for PyPI trusted publishing\n steps:\n - name: Download dist artifacts\n uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1\n with:\n name: dist\n path: dist/\n\n - name: Publish\n uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0\n with:\n repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }}\n skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing\n attestations: true\n verbose: false\n", + ".github/workflows/test-run.yml": "name: Tests\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\npermissions:\n contents: read # required to checkout the code from the repo\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n test:\n name: Run tests\n runs-on: ubuntu-latest\n permissions:\n contents: read\n strategy:\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n steps:\n - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n with:\n persist-credentials: false\n\n - name: Install uv\n uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0\n with:\n enable-cache: true\n python-version: ${{ matrix.python-version }}\n\n - name: Install dependencies\n run: uv sync --dev\n\n - name: Run tests\n run: uv run pytest tests/ -v\n\n - name: CLI smoke test\n run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n\n rollup-test-status:\n name: Check test results\n if: always()\n needs: [test]\n runs-on: ubuntu-latest\n permissions: {}\n steps:\n - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3\n with:\n jobs: ${{ toJSON(needs) }}\n", + ".gitignore": "# Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n# Usually these files are written by a python script from a template\n# before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\n.pybuilder/\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pdm\n# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n#pdm.lock\n# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n# in version control.\n# https://pdm.fming.dev/latest/usage/project/#working-with-version-control\n.pdm.toml\n.pdm-python\n.pdm-build/\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n\n# pytype static type analyzer\n.pytype/\n\n# Cython debug symbols\ncython_debug/\n\n# Benchmark results (machine-specific)\nresults/\n\n# macOS\n.DS_Store\n\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n", + "CODEOWNERS": "# CODEOWNERS \u2014 review routing for botmap\n#\n# botmap's primary user is an AI assistant that is handed a plain-English\n# question about maps and nothing else. Every file below is part of the\n# surface that assistant sees. Changes here are behaviour changes for that\n# assistant, so they get named owners and a hard review checklist.\n#\n# ---------------------------------------------------------------------------\n# AGENT-FACING INVARIANTS \u2014 reviewers MUST block any PR that violates these\n# ---------------------------------------------------------------------------\n# 1. No unexplained empty result. Zero rows must always be accompanied by a\n# stderr sentence saying WHY (wrong category value, place resolved to the\n# wrong region, bbox outside coverage) plus a concrete next command. An\n# assistant reads bare \"0\" as \"there are none\" and reports a wrong answer.\n# This is the worst failure mode in the system.\n# 2. No raw Python traceback ever reaches the user. Network/S3/urllib\n# failures (DNS, timeout, offline, 403) must be caught and re-emitted as\n# a one-line diagnosis + retry/offline advice. Observed regression:\n# `where \"Brooklyn, NY\"` dumping urllib.request internals on a network\n# blip, which the eval scored as a hard failure three times in a row.\n# 3. Unknown subcommand must suggest the closest real one. Observed\n# regression: `botmap building_parts --in \"Cambridge, MA\"` exiting 2 with\n# \"No such command\" and no pointer to `download -t building_part` /\n# `buildings`. Every \"No such command\" path must name a runnable\n# replacement.\n# 4. Unresolvable place names must not dead-end. `where \"Reykjavik, Iceland\"`\n# returning no_match with only generic advice was scored a hard failure in\n# both repeats. A no-match must (a) retry with qualifiers dropped and with\n# country-name -> alpha-2 normalisation, (b) offer local-script/alternate\n# spellings, and (c) print a ready-to-run `--bbox` or `containing LAT,LON`\n# fallback with real numbers where one can be derived.\n# 5. Accept the obvious spelling as well as the official one: singular and\n# plural verbs, underscores and hyphens, `--type`/`-t` values with or\n# without the theme prefix. Aliases are cheap; a wrong first try that\n# cannot become a right second try is not.\n# 6. Every error message names the problem AND gives a copy-pasteable\n# replacement command. \"See --help\" is not a replacement command.\n# 7. stdout is data, stderr is for the human/agent. No diagnostics on stdout.\n# 8. New capability is not shipped until it is discoverable: `capabilities`,\n# `--help`, README, and botmap/data/skill.md must be updated in the same\n# PR, or an assistant will never find it.\n#\n# ---------------------------------------------------------------------------\n# Ownership\n# ---------------------------------------------------------------------------\n\n# Default owners for everything in the repo\n* @overturemaps/omf-public-reviewers\n\n# GitHub Actions, workflows, and repo configuration\n/.github/** @lowlydba @overturemaps/omf-public-reviewers\n\n# --- Command surface: what the assistant can discover and run ---------------\n# Verb names, aliases, unknown-command suggestions, error text, zero-result\n# hints, and the `capabilities` manifest all live here. Review against\n# invariants 1, 3, 5, 6, 7, 8.\n/botmap/cli.py @overturemaps/omf-public-reviewers\n/botmap/intents.py @overturemaps/omf-public-reviewers\n/botmap/introspection.py @overturemaps/omf-public-reviewers\n\n# --- Place-name resolution -------------------------------------------------\n# Qualifier normalisation, country/state aliases, parent fallback, ambiguity\n# warnings. Review against invariants 1 and 4.\n/botmap/geocoding.py @overturemaps/omf-public-reviewers\n/botmap/cache.py @overturemaps/omf-public-reviewers\n\n# --- Filters ---------------------------------------------------------------\n# --where parsing and schema validation. Errors must explain the shell\n# redirection trap and list available fields. Review against invariant 6.\n/botmap/filters.py @overturemaps/omf-public-reviewers\n\n# --- Network / data access -------------------------------------------------\n# STAC catalog, S3 reads, GERS lookup. Any exception escaping this layer as a\n# traceback is a blocking review comment. Review against invariant 2.\n/botmap/core.py @overturemaps/omf-public-reviewers\n/botmap/changelog.py @overturemaps/omf-public-reviewers\n/botmap/releases.py @overturemaps/omf-public-reviewers\n\n# --- Agent documentation shipped with the package --------------------------\n# skill.md is the assistant's de-facto manual; it must be updated in lockstep\n# with cli.py. A new verb with no skill.md recipe is invisible.\n/botmap/data/skill.md @overturemaps/omf-public-reviewers\n/botmap/skill_installer.py @overturemaps/omf-public-reviewers\n/README.md @overturemaps/omf-public-reviewers\n/SPEC.md @overturemaps/omf-public-reviewers\n\n# --- Regression guards for the failures above ------------------------------\n# Any PR touching cli.py, geocoding.py, or core.py should add or update a test\n# here proving the new path yields a named problem + runnable replacement.\n/tests/** @overturemaps/omf-public-reviewers\n/docs/automated-improvements/** @overturemaps/omf-public-reviewers\n\n# ---------------------------------------------------------------------------\n# Files I need in order to fix the eval failures properly, rather than\n# cramming this logic into cli.py:\n#\n# NEW FILE NEEDED: botmap/suggest.py - unknown-subcommand and unknown-verb suggestion plus a verb/type alias table (building_parts -> building_part, plural/singular, hyphen/underscore); this does not belong inline in cli.py\n# NEW FILE NEEDED: botmap/errors.py - one place to turn network/S3/urllib exceptions into a one-line diagnosis + retry advice so no traceback ever reaches the user\n# NEW FILE NEEDED: botmap/placenames.py - country/city name normalisation and local-script fallbacks (Reykjavik -> Reykjav\u00edk, \"X, Iceland\" -> \"X, IS\") kept out of geocoding.py's index logic\n# ---------------------------------------------------------------------------", + "LICENSE": "MIT License\n\nCopyright (c) 2024 Overture Maps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "README.md": "[![PyPi](https://img.shields.io/pypi/v/botmap.svg)](https://pypi.python.org/pypi/botmap)\n\n# botmap\n\n**A fork of [overturemaps-py](https://github.com/OvertureMaps/overturemaps-py), rebuilt as a demonstration of agent-first CLI design.**\n\n`botmap` exists to demonstrate two things:\n\n1. **How to design a CLI for agent use.** What changes when the primary user of a\n command-line tool is an LLM agent rather than a person who has read the docs \u2014\n and how those same changes make the tool friendlier for humans too.\n2. **How LLMs can deliver GIS data to non-experts.** Open geospatial data is\n abundant but gated behind domain expertise: feature types, schemas, bounding\n boxes, category taxonomies. Pair a well-designed CLI with an agent's natural\n language abilities and *\"how many coffee shops are in Brooklyn?\"* becomes a\n question anyone can ask, no GIS background required.\n\nThe data is [Overture Maps](https://overturemaps.org): free and open geospatial\nmap data from many sources, normalized to a\n[common schema](https://github.com/OvertureMaps/schema) (see\n). The upstream `overturemaps` CLI remains the\nofficial Overture tool; `botmap` is the design experiment built on top of it.\n\n## Quick Start\n\nInstall it, install the Skill, then just ask.\n\n```bash\npip install botmap\nbotmap install-skill # registers a Skill so coding agents discover the CLI\n```\n\nNow launch your agent (Claude Code, etc.) and ask anything a map could answer:\n\n> *How many coffee shops are in Brooklyn, NY?*\n>\n> *Find every hospital in Manhattan and display it as an HTML map.*\n>\n> *What restaurants are within 500m of UC Berkeley?*\n\nThe agent picks up the installed Skill, translates the question into botmap's\nverbs, and hands back the data \u2014 no GIS knowledge required, on your part or its.\nThe rest of this README is about *why* that works, and how to drive the CLI\nyourself.\n\n## Redesigning a Data CLI\n\nThe upstream CLI is *data-shaped*: a single `download` command whose flags mirror\nthe storage layout.\n\n```bash\noverturemaps download --bbox=-71.068,42.353,-71.058,42.363 -t place -f geojson -o pois.geojson\n```\n\nUsing it means already knowing which type holds your answer, having a WGS84\nbounding box on hand, and reading the schema docs in another tab. Agents, and\nthe geospatial naive, can't easily ask data-shaped questions. They ask *question-shaped*\nones: \"find hospitals in Manhattan\", \"what's at this lat/lon?\", \"coffee shops\nwithin 1km of here\". So our redesign rule is:\n\n> **Expose verbs that read like the question, and resolve the data-shaped parts internally.**\n\n| Design move | What it looks like |\n|---|---|\n| Verbs over types | `botmap places --category hospital`, not `download -t place --where \u2026` |\n| Lookups, not coordinates | `--in \"Brooklyn\"` resolves names to geometry; no hand-built bboxes |\n| Discovery is a command, not a manual | `themes`, `types`, `schema -t place`, `categories`, `capabilities` |\n| Preview before paying | `count` and `sample` size up a query before any download |\n| `--json` everywhere | every metadata command is a clean pipe source; stdout for data, stderr for humans |\n| Errors teach | zero rows for `--category ferry_terminal` suggests `ferry_boat_company` |\n| Ship the context | `install-skill` registers a Skill so agents discover the CLI on their own |\n| Measured, don't assume | an [eval suite](#agent-usability-evals) scores whether agents can actually use it |\n\n`download` still exists, but it's the escape hatch now, not the front door.\n\n## Driving the CLI Yourself\n\nYou don't need an agent \u2014 the same verbs read naturally by hand. Question-shaped,\nend to end:\n\n```bash\n# \"Where is Brooklyn, and how many coffee shops does it have?\"\nbotmap where \"Brooklyn\"\nbotmap count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n\n# \"Get them as GeoJSON\"\nbotmap places --in \"Brooklyn\" --category coffee_shop -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\nLet the CLI introspect itself \u2014 this is exactly what the Skill teaches an agent to do:\n\n```bash\nbotmap --json capabilities # list every subcommand + parameters\nbotmap --json themes # list themes\nbotmap --json types # list types\nbotmap --json schema -t place # fields + a sample feature\n```\n\nThe data-shaped form still works when you have exact coordinates:\n\n```bash\nbotmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson\n```\n\n## Examples\n\n### Finding POIs\n\n```bash\n# All hospitals in Brooklyn\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# Coffee shops in Brooklyn, with high source confidence\nbotmap places --in \"Brooklyn\" --category coffee_shop --where 'confidence>0.8' \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n\n# Hotels in Berlin (using a country code qualifier)\nbotmap places --in \"Berlin, DE\" --category hotel -f geojsonseq -o berlin_hotels.jsonl\n\n# Pharmacies near the Empire State Building (~250m)\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 20\n```\n\n### Discovering before downloading\n\n```bash\n# What categories exist in Brooklyn? (cheap; reads only places in the bbox)\nbotmap categories -t place --in \"Brooklyn\" --top 30\n\n# How many buildings in Manhattan are at least 100m tall? Decide before downloading.\nbotmap count -t building --in \"Manhattan\" --where 'height>=100'\n\n# Peek at five matching features before committing to the full pull\nbotmap sample -t building --in \"Manhattan\" --where 'height>=100' -n 5\n\n# sample, at, and every convenience verb take -n/--limit to cap output\n# (default: all matches). The low-level `download` command does not.\nbotmap places --in \"Brooklyn\" --category coffee_shop -n 20\n```\n\n### Buildings with attributes\n\n```bash\n# Tall buildings in Manhattan, as GeoParquet for analytics\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geoparquet -o tall.parquet\n\n# Skyscrapers (\u226540 floors) in Chicago\nbotmap buildings --in \"Chicago, IL\" --where 'num_floors>=40' -f geojsonseq -o skyscrapers.jsonl\n\n# Buildings of a specific subtype\nbotmap buildings --in \"Boston, MA\" --where subtype=education -f geojsonseq -o schools.jsonl\n```\n\n### Roads and transportation\n\n```bash\n# Highways in Texas\nbotmap roads --in \"Texas, USA\" --class motorway -f geojsonseq -o tx_highways.jsonl\n\n# Main roads (primary or secondary) in Berlin\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" \\\n -f geojsonseq -o berlin_main.jsonl\n\n# Footways and cycleways in central Amsterdam\nbotmap roads --in \"Amsterdam, NL\" --where \"class in [footway,cycleway]\" \\\n -f geojsonseq -o amsterdam_paths.jsonl\n\n# `roads` covers every transportation segment \u2014 use --class for bike paths too\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### Water and land use\n\n```bash\n# Lakes near Minneapolis\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\n\n# Residential land-use polygons in Brooklyn\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\nBoth `water` and `landuse` mirror `roads`: pass `--class` (e.g. `ocean`,\n`lake`, `river` for water; `commercial`, `residential`, `recreation`,\n`agriculture` for land use) or any `--where` filter.\n\n### Boundary polygons\n\n```bash\n# Get a division's polygon as a GeoJSON Feature (for clipping / spatial joins)\nbotmap boundary \"Alameda County, CA\" > county.geojson\n\n# Longer form: where --geometry does the same thing\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n`boundary` is the dedicated verb for fetching a division's polygon. It accepts\nany place name that `where` resolves, including neighborhood+city forms like\n`\"Brooklyn, NY\"`. `where --geometry` (alias `--geojson`) is an equivalent\nlong-form. Using `download -t division_area` will now error with a redirect.\n\n### Address lookups\n\n```bash\n# Find a specific address (case-insensitive substring on street;\n# --number / --postcode are exact). --in or --bbox is required.\nbotmap addresses --in \"Alameda, US-CA\" \\\n --street Fountain --number 1208\n\n# All \"Main St\" addresses in a city\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# All addresses inside a small bbox over Beacon Hill\nbotmap addresses --bbox=-71.075,42.355,-71.060,42.365 \\\n -f geojsonseq -o beacon_hill_addresses.jsonl\n\n# Address density in a neighborhood\nbotmap count -t address --in \"Brookline, MA\"\n```\n\nThe `addresses` command requires `--in` or `--bbox` so queries stay\nbounded \u2014 the global address dataset is too large to scan unfiltered.\n`--street` is a case-insensitive substring match (so `Fountain` will\nmatch `Fountain St`, `Fountain Avenue`, and `E Fountain Blvd`).\nOverture's address coverage is uneven; if a known address returns no\nrows, the data simply isn't there for that area yet.\n\n### Point queries\n\n```bash\n# What's at a given lat/lon (defaults to nearest POIs)\nbotmap at 51.5074,-0.1278 -n 5\n\n# Which admin divisions contain this point? (innermost-first)\nbotmap containing 35.6762,139.6503\n```\n\n### Composing commands\n\n`--json` makes any metadata command pipeable. Use this for ad-hoc workflows or\nwhen scripting against the CLI.\n\n```bash\n# Resolve a bbox, then download with it\nBBOX=$(botmap --json where \"Berlin, DE\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n\n# Top-3 categories in a place, then dump features for each\nfor cat in $(botmap --json categories -t place --in \"Brooklyn\" --top 3 | jq -r '.[].value'); do\n botmap places --in \"Brooklyn\" --category \"$cat\" \\\n -f geojsonseq -o \"brooklyn_${cat}.jsonl\"\ndone\n\n# Bbox of a country, then count of all roads\nCOUNT=$(botmap --json count -t segment --in \"Iceland\" | jq '.count')\necho \"Iceland has $COUNT road segments\"\n```\n\n### Multi-step agent workflow\n\nA typical sequence an agent runs when given a layperson question like\n*\"how many coffee shops are in Brooklyn?\"*:\n\n```bash\n# 1. Confirm the place resolves\nbotmap --json where \"Brooklyn\"\n# > {\"name\": \"Brooklyn\", \"subtype\": \"locality\", \"region\": \"US-NY\", \"population\": 2736074, ...}\n\n# 2. Discover the right category name\nbotmap --json categories -t place --in \"Brooklyn\" --top 50 | jq -r '.[].value' | grep -i coffee\n# > coffee_shop\n\n# 3. Count\nbotmap --json count -t place --in \"Brooklyn\" --where categories.primary=coffee_shop\n# > {\"count\": 412, ...}\n\n# 4. Download if needed\nbotmap places --in \"Brooklyn\" --category coffee_shop \\\n -f geojsonseq -o brooklyn_coffee.jsonl\n```\n\n----\n\n## Usage\n\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns the matched division's id,\nsubtype, country/region, bbox, population, and parent. `--json` emits a\ncandidates array so an ambiguous query can be re-narrowed.\n\nQualifier syntax: `\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, CC\"`,\n`\"Place, CCC\"`, or `\"Place, Country Name\"` \u2014 e.g. all of these resolve to\nBoston, US-MA: `\"Boston, MA\"`, `\"Boston, US-MA\"`, `\"Boston, US\"`,\n`\"Boston, USA\"`, `\"Boston, United States\"`.\n\n```bash\nbotmap where \"Boston, MA\"\nbotmap where \"Alameda, CA\" --all # list every candidate\nbotmap --json where \"Walnut Creek, CA, USA\" | jq '.bbox'\nbotmap --json where \"Cambridge\" | jq '.candidates | length' # how many Cambridges?\n```\n\nBest match is picked by:\n1. presence of population data (real places people search for outrank\n thinly-documented administrative areas),\n2. higher population,\n3. innermost `admin_level` as a final tiebreaker.\n\nWhen more than one candidate matches, every data command (`places`,\n`buildings`, `roads`, `addresses`, `count`, `sample`, \u2026) prints a one-line\nstderr warning naming the picked division and the top alternative, pointing\nat `where --all` for full inspection. Do not silence stderr \u2014 that warning\nis the only signal that the resolver made a judgment call.\n\n`where` (and all data commands) support neighborhood+city names like\n`\"Brooklyn, NY\"`: when the exact string isn't in the divisions index, the\nresolver retries scoped to the parent locality's region, or falls back to\nthe parent's bbox with a yellow stderr note.\n\n#### `boundary TEXT`\n\nEmit a division's polygon as a GeoJSON Feature on stdout, for clipping or\nspatial joins. Accepts the same place names as `where`.\n\n```bash\nbotmap boundary \"Alameda County, CA\" > county.geojson\nbotmap boundary \"Brooklyn, NY\" | jq '.properties'\n```\n\n`download -t division_area` is no longer supported \u2014 `boundary` is the\nreplacement.\n\n#### `count`\n\nRow count for a query without downloading. The cheap preview that should\nprecede any `download`.\n\n```bash\nbotmap count -t place --in \"Boston, MA\"\nbotmap --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\n```\n\n#### `sample`\n\nEmit the first N features matching a query. Defaults to `geojsonseq` and N=10.\n\n```bash\nbotmap sample -t building --in \"Brooklyn\" --where 'height>100' -n 5\nbotmap sample -t place --in \"Brooklyn\" --where categories.primary=coffee_shop -n 3\n```\n\n#### `themes`, `types`, `schema`\n\nIntrospect what's queryable.\n\n```bash\nbotmap themes # 6 themes with one-line descriptions\nbotmap types --theme buildings # 2 types in this theme\nbotmap --json schema -t place # full field list + a sample feature\n```\n\n#### `categories -t place`\n\nEnumerate `categories.primary` values (with counts) for a place-scoped region.\n\n```bash\nbotmap categories -t place --in \"Brooklyn\" --top 20\nbotmap --json categories -t place --in \"Manhattan\" --top 50 | jq -r '.[] | \"\\(.count)\\t\\(.value)\"'\n```\n\n#### `capabilities`\n\nEmit a machine-readable manifest of all subcommands with their parameters.\nAgents read this once to learn the CLI surface.\n\n```bash\nbotmap --json capabilities | jq '.commands[].name'\n```\n\n#### `places`, `buildings`, `roads`, `addresses`, `water`, `landuse`\n\nIntent verbs that wrap `download` with a familiar shape. Each accepts either\n`--in \"Place Name\"` (resolved via the divisions index) or `--bbox xmin,ymin,xmax,ymax`.\n`--category` / `--class` / `--street` desugar to common `--where` filters,\nand `--where` is still available for advanced predicates. `water` and `landuse`\ntake `--class` just like `roads`. Running `download -t TYPE` for a type covered\nby one of these verbs prints a one-line stderr tip pointing at the verb. All\ndata verbs accept a trailing `--json` flag silently (they already emit GeoJSON).\n\nTransit stops (`bus_stop`, `bus_station`, `train_station`) are `place` features \u2014\n`download -t infrastructure --where class=bus_stop` will error and redirect to\n`places --category bus_stop`.\n\n```bash\n# POIs by category (named place)\nbotmap places --in \"Brooklyn\" --category hospital -f geojsonseq -o hospitals.jsonl\n\n# POIs by category (manual bbox \u2014 skip the named-place lookup)\nbotmap places --bbox=-122.295,37.778,-122.265,37.800 --category coffee_shop\n\n# Buildings filtered by attribute\nbotmap buildings --in \"Manhattan\" --where 'height>150' -f geojsonseq -o tall.jsonl\nbotmap buildings --in \"Boston, MA\" --where 'num_floors>=10' --where 'height>30' -f geoparquet -o tall.parquet\n\n# Roads by class\nbotmap roads --in \"Texas, US\" --class motorway -f geojsonseq -o tx_highways.jsonl\nbotmap roads --in \"Berlin, DE\" --where \"class in [primary,secondary]\" -f geojsonseq -o berlin_main.jsonl\n\n# Addresses by street (case-insensitive substring on --street; --number / --postcode are exact)\nbotmap addresses --in \"Alameda, US-CA\" --street Fountain --number 1234\nbotmap addresses --in \"Brookline, MA\" --street \"Main St\"\n\n# Water and land use by class\nbotmap water --in \"Minneapolis, MN\" --class lake -f geojsonseq -o lakes.jsonl\nbotmap landuse --in \"Brooklyn, NY\" --class residential -f geojsonseq -o zoning.jsonl\n```\n\n`places` includes a zero-result hint: when `--category X` (or\n`--where categories.primary=X`) returns 0 rows AND that value isn't\npresent in the bbox, the CLI scans the bbox once for the live category\nlist and emits a stderr suggestion of up to 3 near-matches drawn from\nwhat's actually there. So `--category ferry_terminal` in a bbox where\nonly `ferry_boat_company` exists yields:\n\n```\n[botmap] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? Run `botmap categories\n-t place --bbox \u2026` to see the full list.\n```\n\nThis means agents typically don't need to round-trip through `categories`\nthemselves; the hint surfaces the right value automatically.\n\n#### `at LAT,LON`\n\nNearest-neighbor lookup at a point. Defaults to `-t place` and `-n 10`. The\n`--radius` (meters) controls how far out to search; per-type defaults are\n100 m for `place`, 50 m for `building`, 25 m for `address`. `--where`\nfilters apply just like the intent verbs, so this is the right command for\n\"X near a point.\"\n\n```bash\nbotmap at 40.7484,-73.9857 # POIs near the Empire State Building\nbotmap at 37.8270,-122.4230 -t place \\\n --radius 1500 --where \"categories.primary=restaurant\" -n 5\nbotmap at 51.5074,-0.1278 -t building -n 3\n```\n\nUse `at \u2026 --where \u2026` instead of constructing a manual bbox + `download`.\nIt's the dedicated proximity primitive and returns features sorted by\ndistance.\n\n#### `containing LAT,LON`\n\nWhich admin divisions contain this point, innermost-first.\n\n```bash\nbotmap containing 42.3601,-71.0589\nbotmap --json containing 35.6762,139.6503 | jq -r '.[] | \"\\(.subtype)\\t\\(.name)\"'\n```\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section so coding agents will reach for this CLI when a user's\nquestion implies geospatial data.\n\n```bash\nbotmap install-skill # interactive\nbotmap install-skill --target claude-user --yes # scripted\nbotmap install-skill --target agents-md --yes # writes ./AGENTS.md\n```\n\n#### `cache info|clear|build`\n\nThe first `--in` or `containing` call builds an on-disk divisions index under\n`$XDG_CACHE_HOME/botmap/` (default `~/.cache/botmap/`). The index\nis keyed by Overture release and rebuilds automatically when the latest\nrelease changes; these commands let you inspect or force the lifecycle.\n\n```bash\nbotmap cache info # path, current release, up-to-date status\nbotmap cache build # force a rebuild against the latest release\nbotmap cache clear # remove all cached index files\n```\n\n#### `gers [UUID]`\n\nLook up an ID in the GERS Registry. If the feature is present in the latest release, it will download the feature and write it out in the specified format.\n\nCommand-line options:\n\n- `-f` (\"geojson\", \"geojsonseq\", \"geoparquet\"): output format, defaults to geojsonseq for a single feature on one line.\n- `--output`/`-o` (optional): Location of output file. When omitted output will be written to stdout.\n- `--connect_timeout` (optional): Socket connection timeout, in seconds. If omitted, the AWS SDK default value is used (typically 1 second).\n- `--request_timeout` (optional): Socket read timeouts on Windows and macOS, in seconds. If omitted, the AWS SDK default value is used (typically 3 seconds). This option is ignored on non-Windows, non-macOS systems.\n\n## Python API\n\n`botmap` is also a Python library. Import directly from `botmap` to query Overture data\nwithout using the CLI.\n\n#### Place-name geocoding\n\n`resolve(name)` returns all matching divisions; `best_match(name)` returns the top\npick. Both read a small on-disk index that builds lazily on first call.\n\n```python\nfrom botmap import best_match, resolve\n\npick = best_match(\"Boston, MA\")\nprint(pick.name, pick.region, pick.bbox)\n# Boston US-MA (-71.19, 42.23, -70.80, 42.40)\n\n# Disambiguate manually\nall_bostons = resolve(\"Boston\")\nfor d in all_bostons:\n print(d.name, d.region, d.population)\n```\n\n#### Counting before downloading\n\n`count_rows` returns the row count for a query without streaming data.\n\n```python\nfrom botmap import best_match, count_rows\n\ndivision = best_match(\"Brooklyn\")\nn = count_rows(\"place\", bbox=division.bbox, stac=True)\nprint(f\"Brooklyn has {n:,} places\")\n```\n\n## Installation\n\nInstall botmap from [PyPI](https://pypi.org/project/botmap/) using pip:\n\n```bash\npip install botmap\n```\n\nIf you have [uv](https://docs.astral.sh/uv/) installed, you can run botmap [with uvx](https://docs.astral.sh/uv/guides/tools/#running-tools) without installing it:\n\n```bash\nuvx botmap count -t building --in \"Boston, MA\"\n```\n\n(The upstream `overturemaps` package is additionally available via Homebrew and\nconda-forge; botmap is currently PyPI-only.)\n\n## Agent-Usability Evals\n\nThe eval suite measures whether an AI agent can answer real geospatial questions\nusing the CLI's high-level verbs \u2014 without falling back to the low-level `download`\ncommand and without triggering CLI errors. The goal is to drive `download` usage\ntoward zero for any question a convenience verb already covers.\n\n### Running the evals\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The first run\nwarms the divisions index cache (one-time, ~30 seconds).\n\n```bash\n# Full batch: 10 questions \u00d7 2 repeats\nuv run python -m evals.runner --model sonnet\nuv run python -m evals.score\nuv run python -m evals.synthesize --model opus\n\n# Single-question smoke test (cheap sanity check)\nuv run python -m evals.runner --smoke --model sonnet\nuv run python -m evals.score\n```\n\nEach run produces three artifacts:\n\n| Artifact | What it contains |\n|---|---|\n| `evals/runs/__r/transcript.jsonl` | Full Claude Code session transcript |\n| `evals/runs/__r/shim.log` | Every `botmap` call with exit codes |\n| `evals/runs/__r/record.json` | Scored metrics for that run |\n| `evals/report.md` | Ranked failure clusters + per-question rates |\n| `evals/proposals.json` | Concrete CLI/skill/docs improvement proposals |\n\n### Question bank\n\nQuestions live in `evals/questions.yaml` and are organized into five tiers of\nincreasing complexity:\n\n| Tier | What it tests |\n|---|---|\n| 1 | Single-verb lookups (`where`, `count`) |\n| 2 | Filtered downloads with attribute predicates |\n| 3 | Point-query primitives (`at`, `containing`) |\n| 4 | Types with no convenience verb \u2014 `download` is the right answer |\n| 5 | Multi-layer spatial joins requiring two verbs plus in-process computation |\n\nEach question carries a `download_is_legitimate` flag. When `false`, any\n`download` call is scored as an agent failure. When `true` (tier 4 questions\nwith no convenience verb), a `download` is a coverage-gap candidate \u2014 a signal\nto add a new verb rather than a failure to penalize the agent.\n\n### Adding questions\n\nAdd an entry to `evals/questions.yaml`:\n\n```yaml\n- id: my-new-question # stable slug, no '__'\n question: \"Natural-language prompt handed verbatim to the agent\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\" # optional; used by the cost guard to bound S3 reads\n notes: \"Ideal path: ...\"\n```\n\n### Reading the output\n\n`evals/report.md` summarises every run after `just eval` completes. The key\ncolumns in the per-question table:\n\n- **Download** \u2014 fraction of runs where any `download` was issued\n- **Unnecessary DL** \u2014 fraction where `download` was used when a verb existed\n- **Error** \u2014 fraction where at least one CLI call exited non-zero\n- **Completed** \u2014 fraction where the agent produced a final answer\n\n`evals/proposals.json` contains LLM-generated, evidence-backed suggestions\n(targeting `cli`, `skill`, `docs`, or `hint`) derived from the failure clusters.\n\n### How it works\n\nThe runner sets up an isolated working directory per run, installs the Overture\nskill so the agent can discover the CLI, and puts a logging shim first on PATH.\nThe shim intercepts every `botmap` call, records the arguments and exit\ncode to `shim.log`, then forwards the call to the real binary. After all runs\ncomplete, the scorer reads each `shim.log` and transcript to produce\n`record.json`, and the synthesizer aggregates those records into the final report\nand proposals.\n\n## Development\n\n```bash\nuv sync\nuv run pytest tests/\n```\n\n", + "SPEC.md": "# overturemaps-py \u2014 Project Specification\n\n**Version**: 0.21.0\n**Python**: \u2265 3.10\n**License**: MIT\n**Maintainers**: Adam Lastowka, Dana Bauer (@overturemaps.org)\n\n---\n\n## 1. Purpose and Scope\n\n`botmap` is the official Python CLI and library for the Overture Maps Foundation. It provides:\n\n1. **Direct S3 streaming**: Download Overture feature data (buildings, places, roads, etc.) from S3 without intermediate staging.\n2. **Spatial filtering**: Bbox-filtered queries using per-row Parquet metadata to minimize bytes transferred.\n3. **Multiple output formats**: GeoJSON, GeoJSONSeq, GeoParquet.\n4. **GERS lookup**: Fetch a single feature by its Overture Global Entity Reference System (GERS) UUID.\n5. **Changelog queries**: Inspect what changed between releases for a given area.\n6. **State tracking**: Sidecar `.state` files to detect when local data is stale.\n\nEverything reads from a single public, anonymous-access S3 bucket (`overturemaps-us-west-2`). No authentication required. No data is written to S3.\n\n---\n\n## 2. Architecture\n\n### 2.1 Layered Design\n\n```\nCLI (cli.py)\n \u2514\u2500\u2500 Core data access (core.py)\n \u251c\u2500\u2500 STAC catalog (stac.overturemaps.org)\n \u251c\u2500\u2500 S3 dataset (pyarrow S3FileSystem, anonymous)\n \u2514\u2500\u2500 GERS registry (binary search over manifest)\n\nWriters (writers.py) \u2190 output format writers + copy() pipeline\nReleases (releases.py) \u2190 thin wrapper over core\nChangelog (changelog.py) \u2190 parallel to core, same S3 bucket\nState (state.py) \u2190 sidecar JSON files\nModels (models.py) \u2190 pure data classes, no I/O\n```\n\n### 2.2 Data Access Patterns\n\n**Default path (STAC-accelerated)**:\n1. Fetch `https://stac.overturemaps.org/catalog.json` (in-process cached).\n2. Download `/{release}/collections.parquet` (column-pruned, spatially filtered).\n3. Extract the list of Parquet file paths that intersect the query bbox.\n4. Open those files as a `pyarrow.dataset.Dataset` with row-level bbox predicate pushdown.\n5. Stream `RecordBatch` objects through writer.\n\n**Fallback path (no STAC)**:\n- `--no-stac` flag skips step 2\u20133; opens the full S3 partition directly.\n\n**GERS path**:\n1. Fetch STAC catalog \u2192 registry manifest (`[filename, max_id]` sorted list).\n2. Binary-search manifest to find the shard file.\n3. Open shard; apply `filters=[(\"id\", \"=\", gers_id)]`.\n\n**Changelog path**:\n1. Attempt STAC-based file list (future capability; currently always falls back).\n2. Open S3 changelog partition directly with hive partitioning.\n3. Apply spatial bbox filter and `change_type != \"unchanged\"`.\n\n### 2.3 S3 Path Conventions\n\n| Data | S3 Path |\n|---|---|\n| Feature data | `overturemaps-us-west-2/release/{release}/theme={theme}/type={type}/` |\n| GERS registry | `overturemaps-us-west-2/registry/{filename}` |\n| Changelog | `overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/` |\n\n---\n\n## 3. Data Model\n\n### 3.1 Feature Types and Themes\n\nExactly 15 feature types across 5 themes:\n\n| Theme | Types |\n|---|---|\n| `addresses` | `address` |\n| `base` | `bathymetry`, `infrastructure`, `land`, `land_cover`, `land_use`, `water` |\n| `buildings` | `building`, `building_part` |\n| `divisions` | `division`, `division_area`, `division_boundary` |\n| `places` | `place` |\n| `transportation` | `connector`, `segment` |\n\n### 3.2 `BBox` Dataclass\n\nFields: `xmin: float`, `ymin: float`, `xmax: float`, `ymax: float`\n\n**Validation invariants** (enforced at CLI boundary):\n- `xmin`, `xmax` \u2208 [-180, 180]\n- `ymin`, `ymax` \u2208 [-90, 90]\n- `xmin \u2264 xmax`\n- `ymin \u2264 ymax`\n\nSerialization: `as_tuple()`, `as_dict()`, `from_dict()`.\n\n### 3.3 `Backend` StrEnum\n\nValues: `geojson`, `geojsonseq`, `geoparquet`.\n\nPython 3.10 compatible (StrEnum added in 3.11; shim required).\n\n### 3.4 `PipelineState` Dataclass\n\nPersisted as JSON sidecar beside output files.\n\n| Field | Type | Notes |\n|---|---|---|\n| `last_release` | `str` | e.g. `\"2025-04-23.0\"` |\n| `last_run` | `str` | ISO 8601 datetime |\n| `theme` | `str` | Overture theme name |\n| `type` | `str` | Overture feature type |\n| `bbox` | `BBox \\| None` | `None` = global download |\n| `backend` | `Backend` | Output format |\n| `output` | `str` | **Absolute** output file path |\n\n`output` MUST be stored as an absolute path (resolved at write time via `Path.resolve()`).\n\n---\n\n## 4. Public Python API\n\nExported from `botmap.__init__`:\n\n```python\nfrom botmap import geodataframe, record_batch_reader, get_all_overture_types\n```\n\n### 4.1 `record_batch_reader`\n\n```python\ndef record_batch_reader(\n type: str,\n bbox: BBox | tuple | list | None = None,\n release: str | None = None,\n connect_timeout: int | None = None,\n request_timeout: int | None = None,\n stac: bool = False,\n) -> pyarrow.RecordBatchReader | None\n```\n\n- Returns a streaming `RecordBatchReader`; returns `None` if no data matches.\n- `bbox=None` queries globally (large data warning applies at CLI layer, not here).\n- `release=None` resolves to latest release.\n- When `stac=True`, uses STAC spatial index to minimize file scanning.\n\n### 4.2 `get_all_overture_types`\n\n```python\ndef get_all_overture_types() -> list[str]\n```\n\nReturns all 15 type keys in deterministic order.\n\n### 4.3 `geodataframe` (optional, not in public API)\n\n```python\ndef geodataframe(\n type: str,\n bbox: ...,\n release: str | None = None,\n ...\n) -> GeoDataFrame\n```\n\nRequires the `geopandas` extra (`pip install botmap[geopandas]`). Raises `ImportError(\"geopandas is required to use this function\")` if `geopandas` is not installed.\n\n### 4.4 `geoarrow_schema_adapter`\n\n```python\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema\n```\n\nTags the `geometry` column with `ARROW:extension:name = geoarrow.wkb`. Geometry stored as raw WKB binary in Parquet; this adapter makes it interpretable by downstream GeoArrow consumers (geopandas, GDAL, etc.) without re-serialization.\n\n---\n\n## 5. CLI Specification\n\nEntry point: `botmap`\n\n**Naked run (no subcommand)**: Prints a blue ASCII art \"Overture Maps\" banner (via `pyfiglet`, `slant` font) and version string to stderr, then prints standard help text to stdout.\n\n**Output colorization**: CLI uses `click.secho`/`click.style` for context-appropriate color. Warnings print yellow; errors print red; success indicators print green; release names print cyan; changelog added/modified/deleted counts print green/yellow/red respectively. `colorama` provides Windows ANSI compatibility automatically via Click.\n\n### 5.1 `download`\n\n```\nbotmap download [OPTIONS]\n```\n\n| Option | Type | Required | Default | Notes |\n|---|---|---|---|---|\n| `--bbox` | `xmin,ymin,xmax,ymax` | No | global | Validated by `BboxParamType` |\n| `-f` | `geojson\\|geojsonseq\\|geoparquet` | Yes | \u2014 | Output format |\n| `-o / --output` | Path | Cond. | stdout | Required for `geoparquet` |\n| `-t / --type` | Choice | Yes | \u2014 | Must be one of 15 types |\n| `-r / --release` | str | No | latest | Validated against available releases |\n| `--stac / --no-stac` | flag | No | `--stac` | Use STAC index |\n| `--connect_timeout` | int | No | \u2014 | S3 connect timeout (seconds) |\n| `--request_timeout` | int | No | \u2014 | S3 request timeout (seconds) |\n\n**Warnings** (stderr, non-fatal):\n- No `--bbox`: warn with estimated download size (~1.2 TB GeoJSON / ~400 GB GeoParquet).\n- `--bbox` covers \u2265 1% of Earth's surface (`area_sq_deg \u2265 648`): warn with size estimates.\n\n**Post-download**: Writes `.state` sidecar (see \u00a73.4). Uses resolved absolute path.\n\n**Geometry column**: If multiple geometry columns found in schema, raises `IOError`.\n\n**GeoParquet metadata**: Strips file-level `bbox` from metadata; adds `covering` sub-object when row-level `bbox` column present.\n\n### 5.2 `gers`\n\n```\nbotmap gers [OPTIONS] GERS_ID\n```\n\n| Argument/Option | Notes |\n|---|---|\n| `GERS_ID` | Validated as UUID; normalized to lowercase-with-dashes |\n| `-f` | Format (same choices as `download`) |\n| `-o / --output` | Output path |\n| `--connect_timeout` | S3 timeout |\n| `--request_timeout` | S3 timeout |\n\n**Without `-f`**: queries GERS registry, prints feature info to stderr, exits 0.\n**With `-f`**: downloads and writes the feature.\n\n### 5.3 `releases`\n\n```\nbotmap releases list\nbotmap releases latest\nbotmap releases check -o FILE\nbotmap releases exists RELEASE\n```\n\n| Subcommand | Behavior | Exit codes |\n|---|---|---|\n| `list` | Print all releases, newest first | 0 |\n| `latest` | Print latest release string | 0 |\n| `check -o FILE` | Compare `.state` sidecar to latest release | 0 = up-to-date, 1 = stale or no state |\n| `exists RELEASE` | Print `true`/`false` | 0 = exists, 1 = not found |\n\n### 5.4 `changelog`\n\n```\nbotmap changelog query [OPTIONS]\nbotmap changelog summary [OPTIONS]\n```\n\n**`query`**:\n- Requires `--bbox`.\n- Requires at least one of `--theme` or `--type`.\n- `--theme` expands to all its types.\n- Prints per-type added/modified/deleted counts.\n- Prints totals when >1 type queried.\n\n**`summary`**:\n- No bbox; scans full theme/type.\n- Prints grand totals when >1 type in results.\n\n---\n\n## 6. Writer Specification\n\nAll writers live in `botmap/writers.py`. All writers implement context manager protocol (`__enter__` / `__exit__`).\n\n### 6.0 `BaseGeoJSONWriter`\n\nAbstract base class managing file handle or stream lifecycle. Subclasses implement `write_feature(geom_str, props)` and optionally `finalize()`. Handles WKB \u2192 Shapely \u2192 GeoJSON geometry conversion and property column filtering (excludes `geometry` and `bbox` columns) in `write_batch()`.\n\n### 6.1 `GeoJSONSeqWriter`\n\n- One `{\"type\":\"Feature\",\"geometry\":...,\"properties\":...}\\n` per feature.\n- Geometry: WKB \u2192 Shapely \u2192 `shapely.to_geojson()`.\n- Properties: all non-`geometry`, non-`bbox` columns; `None` values excluded.\n- Serialization: `orjson` for properties; Shapely's native GeoJSON for geometry.\n\n### 6.2 `GeoJSONWriter`\n\n- Wraps output in `{\"type\":\"FeatureCollection\",\"features\":[...]}`\n- Features comma-separated; `finalize()` closes the array and object.\n\n### 6.3 GeoParquet writer\n\n- Uses `pyarrow.parquet.ParquetWriter`.\n- Strips file-level `bbox` from Parquet metadata.\n- Adds `covering` \u2192 `bbox` sub-object in geo metadata when row-level `bbox` column present.\n- Applies `geoarrow_schema_adapter()` to tag geometry column.\n\n### 6.4 `copy(reader, writer)` contract\n\n- Lives in `writers.py`; imported into `cli.py` for use by the `download` and `gers` commands.\n- Iterates reader via `read_next_batch()` until `StopIteration`.\n- Skips empty batches (zero rows).\n- Reports progress to stderr via `tqdm`.\n\n---\n\n## 7. Changelog Module\n\n### 7.1 `query_changelog_ids`\n\n```python\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]\n```\n\nReturns `{change_type: set[id]}`. Keys present: `\"added\"`, `\"data_changed\"`, `\"removed\"`. `\"unchanged\"` excluded by filter.\n\n`FileNotFoundError` / \"No such file\" \u2192 returns `{}` (changelog not available for this release/type).\n\n### 7.2 `summarize_changelog`\n\n```python\ndef summarize_changelog(\n release: str,\n theme: str,\n type_: str,\n) -> dict[str, dict[str, dict[str, int]]]\n```\n\nReturns `{theme: {type: {change_type: count}}}`. Uses `pyarrow.compute.value_counts()` for efficiency; streams in batches.\n\n### 7.3 STAC Fallback Design\n\n`_get_changelog_files_from_stac()` returns `None` on any exception. Callers treat `None` as \"fall back to direct S3 path scan.\" This design supports future STAC changelog integration without changing caller code.\n\n---\n\n## 8. Release Management\n\n### 8.1 `releases.py` contracts\n\n| Function | Contract |\n|---|---|\n| `list_releases()` | Non-empty; sorted newest-first |\n| `get_latest_release()` | Raises `RuntimeError` if no releases found |\n| `release_exists(r)` | Returns `False` on any network exception (never raises) |\n| `get_next_release(r)` | Returns `None` if `r` is latest, not found, or any exception |\n\n### 8.2 `ALL_RELEASES` proxy\n\nLazy proxy on `core.ALL_RELEASES`. Supports `[]`, iteration, `len()`, `repr()`. Backwards compatibility shim \u2014 do not expand its interface.\n\n---\n\n## 9. State Management\n\n### 9.1 Sidecar convention\n\nState file path = `{output_path}.state` (e.g. `boston.geojson.state`).\n\n### 9.2 `save_state`\n\n- Creates parent directories if missing.\n- Writes JSON with `indent=2`.\n- `output` field stored as absolute, resolved path.\n\n### 9.3 `load_state`\n\n- Returns `None` on: missing file, `FileNotFoundError`, `JSONDecodeError`, `KeyError`.\n- Never raises. Callers must handle `None`.\n\n---\n\n## 10. Non-Functional Requirements\n\n### 10.1 Performance\n\n- **Streaming**: All data flows as `RecordBatch` streams. No full dataset loaded into memory.\n- **STAC index**: Default behavior. Skips file-scanning for non-intersecting Parquet shards.\n- **Predicate pushdown**: Row-group level via PyArrow; avoids reading non-matching row groups.\n- **Batch tuning**: `use_threads=True`, `batch_readahead=16`, `fragment_readahead=4`.\n- **GeoJSON throughput target**: ~10k points in ~31ms, ~10k polygons in ~44ms (Apple M-series baseline; see benchmarks).\n- **GERS binary search**: O(log n) over manifest; avoids scanning all registry shards.\n\n### 10.2 Reliability\n\n- **Anonymous S3**: No credentials to rotate, expire, or leak.\n- **STAC cache**: In-process only; no disk cache. TTL = process lifetime.\n- **Changelog fallback**: STAC stub failure is silent; direct S3 scan always attempted.\n- **Empty batch filtering**: Zero-row batches never passed to writers.\n- **State load failures**: Always `None`, never exception. Stale state = staleness check reports \"update available\", not a crash.\n\n### 10.3 Security\n\n- **No credentials stored**: S3 access is always anonymous.\n- **No remote code execution**: CLI only writes to local filesystem paths explicitly provided by user.\n- **No shell execution** in library code: all S3 I/O via PyArrow; no subprocess calls.\n- **GERS UUID normalization**: Input validated as UUID and normalized before use as filter predicate. Prevents injection into PyArrow filter expressions.\n- **Bbox validation**: All four float bounds validated before use in network requests or filter expressions.\n\n### 10.4 Compatibility\n\n- **Python**: 3.10, 3.11, 3.12, 3.13 (tested in CI matrix).\n- **StrEnum shim**: Python 3.10 compat required; do not use `enum.StrEnum` directly.\n- **geopandas**: Optional extra. Library must import and function without it. `HAS_GEOPANDAS` flag gates all geopandas usage. Stub `GeoDataFrame` class prevents `NameError` at import time.\n\n### 10.5 Observability\n\n- **Progress bar**: `tqdm` to stderr during `copy()`. Never to stdout.\n- **Warnings**: Large download warnings to stderr. Never suppress them.\n- **GERS info**: Registry lookup results printed to stderr (not stdout) when no format specified.\n\n---\n\n## 11. Dependency Constraints\n\n| Package | Min version | Rationale |\n|---|---|---|\n| `click` | 8.3.0 | CLI framework |\n| `colorama` | 0.4.6 | ANSI color compatibility on Windows (used automatically by Click) |\n| `orjson` | 3.9.0 | Fast JSON serialization for GeoJSON output |\n| `pyfiglet` | 1.0.2 | ASCII art banner on naked CLI invocation |\n| `pyarrow` | 15.0.2 | Parquet reading, S3 access, batch streaming |\n| `shapely` | 2.1.0 | WKB decoding, GeoJSON conversion |\n| `numpy` | 1.26.4 | PyArrow/Shapely interop; transitive dep of geopandas |\n| `tqdm` | 4.67.3 | Progress reporting |\n\n**Optional**:\n- `geopandas>=1.1.0` \u2014 `pip install botmap[geopandas]`\n\n**Dev**:\n- `pytest>=8.0.0`, `pytest-mock>=3.11.0`, `pytest-benchmark>=5.0.0`\n\n**Binary build** (dependency group `binary`; not installed by default):\n- `pyinstaller>=6.0`, `pyinstaller-hooks-contrib>=2024.10`\n\n---\n\n## 12. Testing Requirements\n\n### 12.1 Test categories\n\n| Marker | Scope | Network | CI execution |\n|---|---|---|---|\n| (none) | Unit | No | `pytest tests/ -m \"not integration\"` |\n| `integration` | Integration | Yes | CLI smoke test step only |\n| `slow` | Slow unit/bench | No | On-demand |\n\n### 12.2 Unit test coverage requirements\n\n- `BBox`: all serialization methods, all validation failure modes.\n- `Backend`: enum values, string coercion.\n- `PipelineState`: round-trip serialize/deserialize with and without bbox.\n- `BboxParamType`: valid input; 7 failure modes (wrong count, non-numeric, lon OOB, lat OOB, swapped x, swapped y); error messages must include usage examples.\n- `copy()`: all non-empty batches written; empty batches skipped; empty reader handled.\n- `download` state: output path stored as absolute resolved path.\n- `releases exists`: exit code 0 + \"true\" on found; exit code 1 + error on not found.\n- `save_state` / `load_state`: round-trip; missing file \u2192 None; bad JSON \u2192 None; creates nested dirs.\n- `_bbox_area_sq_deg()`: small box, full Earth.\n- Large bbox warning: fires at \u22651% Earth with correct size estimates.\n- No bbox warning: fires with correct size estimates.\n- `botmap.__main__`: importable without side effects; calls `cli()` when run as `__main__`; `python -m botmap --help` exits 0.\n\n### 12.3 Integration test coverage requirements\n\n- `list_releases()`: non-empty, sorted newest-first.\n- `get_latest_release()`: non-empty, contains `-` and `.`.\n- `release_exists()`: True for latest; False for `\"invalid-release\"`.\n- `get_next_release()`: None for latest; returns latest for second-to-latest.\n- GERS query: known UUID returns 1-row batch with `id`, `geometry`, `bbox`.\n- GERS query: non-existent UUID returns None.\n- `query_changelog_ids()`: small bbox returns dict of string sets.\n- `query_changelog_ids()`: ocean bbox returns all-empty sets.\n- `summarize_changelog()`: theme query returns nested dict with int counts.\n\n### 12.4 Benchmark baselines\n\n- 10k points GeoJSONSeq write: < 100ms (M-series target: ~31ms).\n- 10k polygons GeoJSONSeq write: < 150ms (M-series target: ~44ms).\n- Benchmarks must not require network access.\n\n---\n\n## 13. CI/CD Requirements\n\n### 13.1 Test workflow\n\n- Triggers: push to `main`, PR to `main`.\n- Matrix: Python 3.10, 3.11, 3.12, 3.13.\n- Steps: checkout \u2192 setup-uv (with cache) \u2192 `uv sync --dev` \u2192 `pytest tests/ -v` \u2192 CLI smoke test.\n- Smoke test: Boston buildings download to file, format `geojson`.\n- Rollup job `are-we-good` must always run; blocks merge on any matrix failure.\n- Concurrency: cancel-in-progress for same workflow+ref.\n\n### 13.2 Publish workflow\n\n- Production trigger: `release: published` GitHub event.\n- Test trigger: `workflow_dispatch`.\n- Build: `uv build` \u2192 artifact `dist/`.\n- Publish: `pypa/gh-action-pypi-publish` with OIDC (no stored API tokens).\n- `skip-existing: true` for test publishes; `attestations: true` always.\n- GitHub environments: `pypi` (production), `test-pypi`.\n\n### 13.3 Binary build workflow\n\n- Trigger: `release: published` GitHub event; `workflow_dispatch` for dry-run (uploads artifacts, does not attach to release).\n- Matrix: `ubuntu-latest` (linux-x86_64), `macos-latest` (macos-arm64), `macos-13` (macos-x86_64), `windows-latest` (windows-x86_64).\n- Tool: PyInstaller `--onefile` via `uv run pyinstaller`; `--collect-all pyarrow`, `--collect-all shapely`, `--collect-data pyfiglet`.\n- Entry point: `botmap/__main__.py`.\n- Output naming: `botmap-{version}-{target}[.exe]`.\n- Post-build smoke test: binary invoked with `--help`; must exit 0.\n- Release attachment: `gh release upload` with `contents: write` scoped to job level.\n\n### 13.4 Action pinning\n\n- All GitHub Actions pinned to full commit SHAs.\n- Dependabot monitors `github-actions` ecosystem weekly.\n- `actions/*` updates grouped into single PR.\n- PRs labeled `bot`; commit prefix `[CHORE](deps)`.\n\n---\n\n## 14. Code Quality and Best Practices\n\n### 14.1 What to enforce\n\n- **No linter config currently exists** (no ruff, black, mypy, pre-commit). Adding any of these is in-scope for quality improvement.\n- **Type annotations**: all public API functions should have full type annotations. Internal helpers may be unannotated where obvious.\n- **Docstrings**: not required by convention. Add only where behavior is non-obvious (e.g. STAC fallback design, binary search invariants).\n- **No mutable default arguments**.\n- **StrEnum shim** must be tested for Python 3.10 behavior.\n\n### 14.2 Error handling principles\n\n- **Validate at CLI boundary**: bbox, release string, GERS UUID, format choice. Library functions trust their callers.\n- **Fail fast on invalid type**: `type` not in `type_theme_map` should raise `KeyError` immediately, not silently produce an empty result.\n- **No silent swallowing** except: `load_state` (missing/corrupt state is non-fatal by design), `release_exists` (network errors = False), STAC fallback (fallback is the contract).\n- **`RuntimeError` for unrecoverable catalog failures** (e.g. no releases found).\n\n### 14.3 Output discipline\n\n- **stdout is data**: GeoJSON/GeoJSONSeq/GeoParquet content goes to stdout when no `-o`. No diagnostic output to stdout ever.\n- **stderr is user**: warnings, progress bars, GERS info, error messages all go to stderr.\n- **Exit codes**: 0 = success/true/up-to-date; 1 = failure/false/stale.\n\n### 14.4 Backwards compatibility\n\n- `ALL_RELEASES` lazy proxy retained for backwards compatibility. Do not remove.\n- `record_batch_reader` and `get_all_overture_types` are the public API contract. Signature changes require a version bump.\n- New optional parameters may be added with defaults without bumping major version.\n\n---\n\n## 15. Build and Release\n\n- **Build backend**: `hatchling`\n- **Package manager / task runner**: `uv` + `just`\n- **Version source**: `pyproject.toml` `version` field (not dynamic)\n- **Release cadence**: Tracks Overture Maps data releases (approximately monthly)\n- **PyPI package name**: `botmap`\n- **Standalone binaries**: Built via PyInstaller on release; attached to GitHub Release as assets for linux-x86_64, macos-arm64, macos-x86_64, windows-x86_64. Local build: `just build-binary`.\n- **`python -m botmap`**: Supported via `botmap/__main__.py`; same entry point used by PyInstaller.\n\nVersion bump checklist:\n1. Update `version` in `pyproject.toml`.\n2. Create GitHub release with matching tag.\n3. Publish workflow auto-triggers on release event.\n", + "benchmarks/bench_count_rows.py": "\"\"\"\nNetwork benchmark for count_rows overhead.\n\nMeasures how long count_rows() takes for different bbox sizes,\nisolated from the actual download time.\n\nRequires network access (hits S3 directly).\n\nRun:\n pytest benchmarks/bench_count_rows.py -v\n\"\"\"\n\nimport pytest\n\nfrom botmap.core import count_rows\n\nBBOX_SMALL = (-71.068, 42.353, -71.058, 42.363) # ~10 blocks\nBBOX_BOSTON = (-71.191, 42.227, -70.985, 42.400) # full city\n\n\n@pytest.mark.integration\ndef test_count_rows_small(benchmark):\n \"\"\"count_rows overhead for a small bbox (~10 blocks).\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_SMALL), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n\n\n@pytest.mark.integration\ndef test_count_rows_city(benchmark):\n \"\"\"count_rows overhead for a full city bbox.\"\"\"\n benchmark.pedantic(\n count_rows, args=(\"building\", BBOX_BOSTON), kwargs={\"stac\": True}, rounds=3, iterations=1\n )\n", + "benchmarks/bench_geojson_writer.py": "\"\"\"\nBenchmarks for the GeoJSON writing pipeline.\n\nExercises the write_batch() hot loop to establish a baseline for each stage:\n Arrow->Python, WKB decode, geo_interface conversion, json.dumps.\n\nRun all benchmarks:\n pytest benchmarks/ -v\n\nRun only benchmarks (skip normal tests):\n pytest benchmarks/ -v --benchmark-only\n\nSave results to JSON for later comparison:\n pytest benchmarks/ --benchmark-json=results/baseline.json\n\"\"\"\nimport io\nimport json\nimport random\n\nimport pyarrow as pa\nimport pytest\nimport shapely\nimport shapely.wkb\nfrom shapely.geometry import Point, Polygon\n\nfrom botmap.writers import GeoJSONSeqWriter\n\n\n# ---------------------------------------------------------------------------\n# Synthetic data helpers\n# ---------------------------------------------------------------------------\n\n_BBOX_TYPE = pa.struct(\n [\n pa.field(\"xmin\", pa.float64()),\n pa.field(\"ymin\", pa.float64()),\n pa.field(\"xmax\", pa.float64()),\n pa.field(\"ymax\", pa.float64()),\n ]\n)\n\n_NAMES_TYPE = pa.struct([pa.field(\"primary\", pa.string())])\n\n\ndef _point_wkb(lon, lat):\n return shapely.wkb.dumps(Point(lon, lat))\n\n\ndef _polygon_wkb(cx, cy, r=0.01):\n coords = [\n (cx - r, cy - r),\n (cx + r, cy - r),\n (cx + r, cy + r),\n (cx - r, cy + r),\n (cx - r, cy - r),\n ]\n return shapely.wkb.dumps(Polygon(coords))\n\n\ndef _make_batch(n_rows, geom_fn, seed=42):\n \"\"\"Return a PyArrow RecordBatch that mimics an Overture Parquet partition.\"\"\"\n rng = random.Random(seed)\n lons = [rng.uniform(-180, 180) for _ in range(n_rows)]\n lats = [rng.uniform(-90, 90) for _ in range(n_rows)]\n\n return pa.record_batch(\n {\n \"id\": pa.array(\n [f\"08f{i:015x}\" for i in range(n_rows)], type=pa.string()\n ),\n \"geometry\": pa.array(\n [geom_fn(lon, lat) for lon, lat in zip(lons, lats)],\n type=pa.binary(),\n ),\n \"bbox\": pa.array(\n [\n {\n \"xmin\": lon - 0.01,\n \"ymin\": lat - 0.01,\n \"xmax\": lon + 0.01,\n \"ymax\": lat + 0.01,\n }\n for lon, lat in zip(lons, lats)\n ],\n type=_BBOX_TYPE,\n ),\n \"confidence\": pa.array(\n [rng.random() for _ in range(n_rows)], type=pa.float64()\n ),\n \"names\": pa.array(\n [{\"primary\": f\"feature_{i}\"} for i in range(n_rows)],\n type=_NAMES_TYPE,\n ),\n }\n )\n\n\n# ---------------------------------------------------------------------------\n# Fixtures (session-scoped so batch construction is outside timing)\n# ---------------------------------------------------------------------------\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_points():\n return _make_batch(1_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_points():\n return _make_batch(10_000, _point_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_1k_polygons():\n return _make_batch(1_000, _polygon_wkb)\n\n\n@pytest.fixture(scope=\"session\")\ndef batch_10k_polygons():\n return _make_batch(10_000, _polygon_wkb)\n\n\n# ---------------------------------------------------------------------------\n# Full pipeline benchmarks\n# (Arrow batch -> GeoJSON newline-delimited text, written to StringIO)\n# ---------------------------------------------------------------------------\n\n\ndef _make_writer():\n \"\"\"GeoJSONSeqWriter backed by an in-memory sink (removes disk I/O from timing).\"\"\"\n return GeoJSONSeqWriter(io.StringIO())\n\n\ndef test_full_pipeline_1k_points(benchmark, batch_1k_points):\n \"\"\"Full write_batch pipeline: 1 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_points)\n\n\ndef test_full_pipeline_10k_points(benchmark, batch_10k_points):\n \"\"\"Full write_batch pipeline: 10 000 point rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_points)\n\n\ndef test_full_pipeline_1k_polygons(benchmark, batch_1k_polygons):\n \"\"\"Full write_batch pipeline: 1 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_1k_polygons)\n\n\ndef test_full_pipeline_10k_polygons(benchmark, batch_10k_polygons):\n \"\"\"Full write_batch pipeline: 10 000 polygon rows -> GeoJSONSeq.\"\"\"\n writer = _make_writer()\n benchmark(writer.write_batch, batch_10k_polygons)\n\n\n# ---------------------------------------------------------------------------\n# Isolated stage benchmarks\n# Each stage is timed independently using pre-computed inputs so only the\n# operation under test contributes to the measurement.\n# ---------------------------------------------------------------------------\n\n\ndef test_stage_to_pylist(benchmark, batch_10k_points):\n \"\"\"Stage 1 \u2014 Arrow batch -> Python list of dicts (batch.to_pylist).\"\"\"\n benchmark(batch_10k_points.to_pylist)\n\n\ndef test_stage_wkb_loads_loop(benchmark, batch_10k_points):\n \"\"\"Stage 2 \u2014 WKB decode: shapely.wkb.loads() called once per row in a loop.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n\n def run():\n return [shapely.wkb.loads(b) for b in geom_bytes]\n\n benchmark(run)\n\n\ndef test_stage_geo_interface_loop(benchmark, batch_10k_points):\n \"\"\"Stage 3 \u2014 Shapely geometry -> __geo_interface__ dict, once per row.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n\n def run():\n return [g.__geo_interface__ for g in geoms]\n\n benchmark(run)\n\n\ndef test_stage_json_dumps_loop(benchmark, batch_10k_points):\n \"\"\"Stage 4 \u2014 json.dumps() once per GeoJSON feature.\"\"\"\n geom_bytes = batch_10k_points.column(\"geometry\").to_pylist()\n geoms = [shapely.wkb.loads(b) for b in geom_bytes]\n features = [\n {\"type\": \"Feature\", \"geometry\": g.__geo_interface__, \"properties\": {}}\n for g in geoms\n ]\n\n def run():\n return [json.dumps(f, separators=(\",\", \":\")) for f in features]\n\n benchmark(run)\n", + "botmap/__init__.py": "from .core import geodataframe, get_all_overture_types, record_batch_reader, count_rows\nfrom .geocoding import resolve, best_match, Division\n", + "botmap/__main__.py": "from botmap.cli import cli\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/cache.py": "\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the botmap cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"botmap\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"botmap\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\", \"bbox\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary only.\n # names.common is map (language -> localized name) in real\n # Overture data; PyArrow's join backend rejects map and list types as\n # non-key fields. v1 of the index therefore matches only against\n # name_primary. Common-name match coverage can be revisited if user\n # feedback warrants the complexity.\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n\n # Extract the division's own bbox (present for all features, including\n # point-geometry divisions like microhoods that have no division_area row).\n div_bbox = div.column(\"bbox\").combine_chunks()\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n # Cast any null-typed columns to string so the join backend accepts them.\n def _as_string(col: pa.ChunkedArray) -> pa.ChunkedArray:\n if pa.types.is_null(col.type):\n return col.cast(pa.string())\n return col\n\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"subtype\": _as_string(div.column(\"subtype\")),\n \"class\": _as_string(div.column(\"class\")),\n \"country\": _as_string(div.column(\"country\")),\n \"region\": _as_string(div.column(\"region\")),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": _as_string(div.column(\"parent_division_id\")),\n # Stash the division's own bbox so point-geometry divisions (microhoods,\n # some neighborhoods) survive the left join when no division_area exists.\n \"own_xmin\": pc.struct_field(div_bbox, \"xmin\"),\n \"own_ymin\": pc.struct_field(div_bbox, \"ymin\"),\n \"own_xmax\": pc.struct_field(div_bbox, \"xmax\"),\n \"own_ymax\": pc.struct_field(div_bbox, \"ymax\"),\n })\n\n # Left outer join: keep every division even if it has no division_area polygon.\n # Divisions without an area (e.g. point-geometry microhoods) will have null\n # values for the bbox_* columns from the right side.\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"left outer\")\n\n # Coalesce: prefer the area-derived bbox; fall back to the division's own bbox\n # for point-geometry divisions that have no division_area row.\n for area_col, own_col in [\n (\"bbox_xmin\", \"own_xmin\"),\n (\"bbox_ymin\", \"own_ymin\"),\n (\"bbox_xmax\", \"own_xmax\"),\n (\"bbox_ymax\", \"own_ymax\"),\n ]:\n coalesced = pc.if_else(\n pc.is_valid(joined.column(area_col)),\n joined.column(area_col),\n joined.column(own_col),\n )\n idx = joined.schema.get_field_index(area_col)\n joined = joined.set_column(idx, area_col, coalesced)\n joined = joined.drop_columns([\"own_xmin\", \"own_ymin\", \"own_xmax\", \"own_ymax\"])\n\n # Expand point-geometry bboxes so --in queries return a usable area.\n # Divisions like microhoods and some neighborhoods have only a point in\n # the source data; a degenerate bbox (xmin==xmax, ymin==ymax) would make\n # --in return almost nothing. A ~1 km buffer gives a reasonable footprint\n # for neighborhood-scale queries without over-expanding larger places.\n _POINT_THRESHOLD = 0.001 # degrees; smaller than any real area polygon\n _POINT_BUFFER = 0.009 # degrees; \u2248 1 km at mid-latitudes\n xmin = joined.column(\"bbox_xmin\")\n xmax = joined.column(\"bbox_xmax\")\n ymin = joined.column(\"bbox_ymin\")\n ymax = joined.column(\"bbox_ymax\")\n is_point = pc.and_(\n pc.less(pc.subtract(xmax, xmin), _POINT_THRESHOLD),\n pc.less(pc.subtract(ymax, ymin), _POINT_THRESHOLD),\n )\n for col, op, base in [\n (\"bbox_xmin\", pc.subtract, xmin),\n (\"bbox_ymin\", pc.subtract, ymin),\n (\"bbox_xmax\", pc.add, xmax),\n (\"bbox_ymax\", pc.add, ymax),\n ]:\n buffered = op(base, _POINT_BUFFER)\n idx = joined.schema.get_field_index(col)\n joined = joined.set_column(idx, col, pc.if_else(is_point, buffered, base))\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n", + "botmap/changelog.py": "\"\"\"Functions for querying and processing the Overture Maps GERS changelog.\n\nThis module uses pyarrow for reading and filtering changelog data from S3.\nIt supports STAC catalog acceleration when available.\n\nSTAC Support\n------------\nThis module is prepared to use the STAC catalog for accelerated spatial queries\nwhen changelog files are added to the STAC index. The _get_changelog_files_from_stac()\nfunction will automatically enable this optimization once the catalog includes changelog\npartitions. Until then, queries fall back to direct S3 path scanning.\n\nSee: https://stac.overturemaps.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Optional\nfrom urllib.request import urlopen\n\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\n# S3 path template for the changelog Parquet files\nCHANGELOG_S3_PATH_TEMPLATE = (\n \"overturemaps-us-west-2/changelog/{release}/theme={theme}/type={type}/\"\n)\n\n\ndef _get_changelog_files_from_stac(\n theme: str, type_: str, bbox: BBox, release: str\n) -> Optional[list[str]]:\n \"\"\"Get changelog file paths from STAC catalog for spatial query optimization.\n\n This function checks the STAC catalog for changelog file entries and returns\n only the files whose bounding boxes intersect with the query bbox. This can\n dramatically reduce query time by avoiding full S3 partition scans.\n\n NOTE: As of early 2026, changelog files are not yet included in the STAC catalog.\n This function is prepared for when that feature becomes available. Until then,\n it returns None, causing queries to fall back to direct S3 path scanning.\n\n Args:\n theme: Overture theme name (e.g., \"buildings\").\n type_: Overture feature type (e.g., \"building\").\n bbox: Bounding box for spatial filtering.\n release: Overture release ID (e.g., \"2025-01-21.0\").\n\n Returns:\n List of S3 paths (bucket/key format) if STAC has changelog data, None otherwise.\n \"\"\"\n stac_changelog_url = f\"https://stac.overturemaps.org/{release}/changelog.parquet\"\n\n try:\n # Try to read the STAC changelog index\n with urlopen(stac_changelog_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n # Filter by theme/type\n feature_type_filter = (pc.field(\"theme\") == theme) & (pc.field(\"type\") == type_)\n\n # Spatial filter: only include files whose bbox overlaps query bbox\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n filtered_table = stac_table.filter(combined_filter)\n\n if filtered_table.num_rows > 0:\n # Extract S3 paths\n file_paths = filtered_table.column(\"assets\").to_pylist()\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n # No matching files in this region\n return []\n\n except Exception:\n # STAC changelog not available yet, return None to trigger fallback\n return None\n\n\ndef query_changelog_ids(\n release: str,\n theme: str,\n type_: str,\n bbox: BBox,\n) -> dict[str, set[str]]:\n \"\"\"Query changelog and return classified ID sets using pyarrow.\n\n This function reads changelog Parquet files from S3 and returns sets of IDs\n for added, modified, and removed features within the specified bbox.\n\n Automatically attempts to use STAC catalog for query acceleration. When changelog\n files are added to STAC, this will speed up spatial queries. Until then, transparently\n falls back to direct S3 access.\n\n Args:\n release: Overture release ID (e.g. \"2024-11-13.0\").\n theme: Overture theme name (e.g. \"buildings\").\n type_: Overture feature type (e.g. \"building\").\n bbox: Bounding box to spatially filter changes.\n\n Returns:\n Dictionary mapping change_type to sets of feature IDs.\n \"\"\"\n # Try STAC first (will automatically work when changelog added to STAC)\n s3_paths = _get_changelog_files_from_stac(theme, type_, bbox, release)\n\n # Create S3 filesystem\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use STAC paths if available, otherwise use full partition path\n if s3_paths is not None:\n if len(s3_paths) == 0:\n # No files intersect the bbox\n return {}\n # Use specific files from STAC\n dataset_path = s3_paths\n else:\n # STAC not available, use full path pattern\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme, type=type_\n )\n\n try:\n # Create dataset\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Build spatial filter\n spatial_filter = (\n (pc.field(\"bbox\", \"xmin\") <= bbox.xmax)\n & (pc.field(\"bbox\", \"xmax\") >= bbox.xmin)\n & (pc.field(\"bbox\", \"ymin\") <= bbox.ymax)\n & (pc.field(\"bbox\", \"ymax\") >= bbox.ymin)\n & (pc.field(\"change_type\") != \"unchanged\")\n )\n\n # Read only id and change_type columns with filter\n table = dataset.to_table(filter=spatial_filter, columns=[\"id\", \"change_type\"])\n\n # Group IDs by change_type\n changes: dict[str, set[str]] = {}\n\n if table.num_rows > 0:\n ids = table.column(\"id\").to_pylist()\n change_types = table.column(\"change_type\").to_pylist()\n\n for id_, change_type in zip(ids, change_types):\n changes.setdefault(change_type, set()).add(id_)\n\n return changes\n\n except FileNotFoundError:\n # If no data found (e.g., missing changelog files), return empty dict\n return {}\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n return {}\n raise\n\n\ndef summarize_changelog(\n release: str,\n theme: str | None = None,\n type_: str | None = None,\n) -> dict[str, dict[str, dict[str, int]]]:\n \"\"\"Return change counts by type for one or more themes without bbox filtering.\n\n Args:\n release: Overture release ID.\n theme: Overture theme name (optional, defaults to all themes).\n type_: Overture feature type (optional, defaults to all types in theme).\n\n Returns:\n Nested dictionary: {theme: {type: {change_type: count}}}.\n \"\"\"\n from .core import type_theme_map\n\n results = {}\n s3_fs = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Determine which theme/type combinations to query\n if theme and type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n themes_types = [(theme, type_)]\n elif theme:\n types = _get_types_for_theme(theme)\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise ValueError(f\"Unknown type: {type_}\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n themes_types = [(type_theme_map[t], t) for t in sorted(type_theme_map.keys())]\n\n # Query each theme/type combination\n for theme_name, type_name in themes_types:\n dataset_path = CHANGELOG_S3_PATH_TEMPLATE.format(\n release=release, theme=theme_name, type=type_name\n )\n\n try:\n dataset = ds.dataset(\n dataset_path,\n filesystem=s3_fs,\n format=\"parquet\",\n partitioning=\"hive\",\n )\n\n # Stream in batches to avoid loading all rows into memory at once.\n # Use pc.value_counts() per batch for vectorised counting.\n change_counts: dict[str, int] = {}\n for batch in dataset.to_batches(columns=[\"change_type\"]):\n if batch.num_rows == 0:\n continue\n for item in pc.value_counts(batch.column(\"change_type\")).to_pylist():\n ct = item[\"values\"]\n change_counts[ct] = change_counts.get(ct, 0) + item[\"counts\"]\n\n # Build nested structure\n if theme_name not in results:\n results[theme_name] = {}\n results[theme_name][type_name] = change_counts\n\n except FileNotFoundError:\n # This theme/type has no changelog data for this release\n continue\n except Exception as e:\n if \"No such file\" in str(e) or \"does not exist\" in str(e):\n continue\n raise\n\n return results\n\n\ndef _get_types_for_theme(theme: str) -> list[str]:\n \"\"\"Get all feature types for a given theme.\n\n Args:\n theme: Overture theme name.\n\n Returns:\n List of feature types in the theme.\n \"\"\"\n from .core import type_theme_map\n\n return [type_ for type_, t in type_theme_map.items() if t == theme]\n", + "botmap/cli.py": "\"\"\"\nOverture Maps (overturemaps.org) command line utility.\n\nCurrently provides the ability to extract features from an Overture dataset\nin a specified bounding box in a few different file formats.\n\n\"\"\"\n\nimport importlib.metadata\nimport os\nimport sys\nimport uuid\nfrom datetime import datetime, timezone\n\nimport click\nimport orjson\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .changelog import query_changelog_ids, summarize_changelog\nfrom .introspection import list_themes, list_types, flatten_schema\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\nfrom .core import (\n count_rows,\n get_all_overture_types,\n get_available_releases,\n get_latest_release,\n record_batch_reader,\n record_batch_reader_from_gers,\n type_theme_map,\n)\nfrom .models import Backend, BBox, PipelineState\nfrom .releases import list_releases, release_exists\nfrom .state import get_state_path, load_state, save_state\nfrom .writers import copy, get_writer\nfrom .filters import parse_where_expr, ParsedFilter\nfrom .geocoding import resolve\nfrom .cache import cache_info, clear_cache, build_index, index_path\nfrom . import skill_installer\n\n\ndef _safe_reader(type_, bbox, release, ct, rt, stac, **kw):\n \"\"\"Wrap record_batch_reader, converting schema-validation ValueError.\"\"\"\n try:\n return record_batch_reader(type_, bbox, release, ct, rt, stac, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _safe_count(type_, **kw):\n \"\"\"Wrap count_rows, converting schema-validation ValueError.\"\"\"\n try:\n return count_rows(type_, **kw)\n except ValueError as e:\n raise click.UsageError(str(e))\n\n\ndef _parse_latlon(latlon: str) -> tuple[float, float]:\n \"\"\"Parse 'LAT,LON' string into (lat, lon) floats.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n return float(parts[0]), float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n\ndef _json_default(value):\n \"\"\"Fallback serializer for orjson \u2014 hex-encode raw bytes.\"\"\"\n if isinstance(value, (bytes, bytearray)):\n return value.hex()\n raise TypeError(f\"Type is not JSON serializable: {type(value).__name__}\")\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(\n payload, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n\n\ndef _describe_division(d) -> str:\n \"\"\"One-line label like 'Alameda (locality, US-CA, pop 78,280)'.\"\"\"\n qual = d.region or d.country or \"?\"\n pop = f\"pop {d.population:,}\" if d.population is not None else \"pop ?\"\n return f\"{d.name} ({d.subtype}, {qual}, {pop})\"\n\n\ndef _suggest_categories(type_: str, bbox, release, target: str, n: int = 3):\n \"\"\"Scan `bbox` for `categories.primary` values and return up to `n`\n closest matches to `target`. Used to power 0-result hints \u2014 only call\n on the failure path, since this issues a second scan of the bbox.\n\n Ranking is token-aware: `ferry_terminal` should match `ferry_service`\n via the shared \"ferry\" token, not `cafeteria` via character overlap.\n \"\"\"\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return []\n seen: set[str] = set()\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\").to_pylist()\n for v in primary:\n if v is not None:\n seen.add(v)\n if not seen:\n return []\n\n import difflib\n target_lower = target.lower()\n target_tokens = set(target_lower.replace(\"_\", \" \").split())\n matcher = difflib.SequenceMatcher(autojunk=False)\n matcher.set_seq1(target_lower)\n\n # Inclusion rules (any one passes):\n # - token overlap >= 1 \u2192 \"ferry_terminal\" ~ \"ferry_service\"\n # - substring \u2192 \"cafe\" ~ \"cafeteria\"\n # - ratio >= 0.75 \u2192 typo correction (\"coffe_shop\" ~ \"coffee_shop\")\n # Anything weaker is noise (e.g. cafeteria ~ ferry_terminal at 0.609).\n scored = []\n for v in seen:\n v_lower = v.lower()\n matcher.set_seq2(v_lower)\n ratio = matcher.ratio()\n v_tokens = set(v_lower.replace(\"_\", \" \").split())\n token_overlap = len(target_tokens & v_tokens)\n substring_hit = int(target_lower in v_lower or v_lower in target_lower)\n if token_overlap or substring_hit or ratio >= 0.75:\n score = ratio + 0.2 * token_overlap + 0.15 * substring_hit\n scored.append((score, v))\n if not scored:\n return []\n scored.sort(key=lambda x: x[0], reverse=True)\n return [v for _, v in scored[:n]]\n\n\ndef _no_match_help(query: str) -> str:\n \"\"\"Build an actionable message when a place query resolves to nothing.\n\n Retries once with qualifiers dropped (the bare name). If that resolves,\n names the candidate so the caller has a recovery path; otherwise explains\n the neighborhood/parent fallback. Covers the two common agent failures:\n neighborhood names (\"Williamsburg, Brooklyn\") and over-qualified queries\n (\"Brooklyn, New York\") that the divisions index can't match directly.\n \"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n base = f\"No division found for {query!r}.\"\n if qualifiers:\n fallback = resolve(name)\n if fallback:\n top = fallback[0]\n return (\n f\"{base} The qualifier {', '.join(qualifiers)!r} matched \"\n f\"nothing, but {name!r} alone resolves to \"\n f\"{_describe_division(top)}. Use that, `containing LAT,LON`, \"\n f\"or `--bbox`.\"\n )\n return (\n f\"{base} It may be a neighborhood not in Overture's divisions index. \"\n f\"Try a parent locality (city \u2192 state \u2192 country), `containing \"\n f\"LAT,LON`, or `--bbox`.\"\n )\n\n\ndef _resolve_in_place(in_place: str):\n \"\"\"Resolve a --in query to a Division, warning to stderr on ambiguity.\n\n - Raises click.UsageError if no division matches.\n - On multiple matches, prints a one-line stderr warning naming the\n picked division and the top alternative. Returns the picked one.\n - When a qualifier is a locality name rather than a region code, retries\n the original name scoped to that locality's region, then falls back to\n the locality's own bbox \u2014 rather than failing outright.\n - Silent on a single unambiguous match.\n \"\"\"\n matches = resolve(in_place)\n if not matches:\n # The qualifier may be a locality name (\"Brooklyn\") instead of a region\n # code (\"US-NY\"). Try each qualifier as a place; if it resolves, scope\n # the original name to that place's region and retry.\n parts = [p.strip() for p in in_place.split(\",\")]\n name, qualifiers = parts[0], [p for p in parts[1:] if p]\n for qualifier in qualifiers:\n parent_matches = resolve(qualifier)\n if not parent_matches:\n continue\n parent = parent_matches[0]\n if parent.region:\n scoped = resolve(f\"{name}, {parent.region}\")\n if scoped:\n result = scoped[0]\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"resolved via parent {qualifier!r} \u2192 \"\n f\"using {_describe_division(result)}\",\n fg=\"yellow\", err=True,\n )\n return result\n # Couldn't find the name in the parent's region \u2014 use the parent's\n # bbox directly so the query still runs over a bounded area.\n click.secho(\n f\"[botmap] {in_place!r} not in divisions index; \"\n f\"using parent {qualifier!r} \"\n f\"({_describe_division(parent)}) bbox instead\",\n fg=\"yellow\", err=True,\n )\n return parent\n raise click.UsageError(_no_match_help(in_place))\n picked = matches[0]\n if len(matches) > 1:\n alt = matches[1]\n more = f\" (+{len(matches) - 2} more)\" if len(matches) > 2 else \"\"\n click.secho(\n f\"[botmap] Ambiguous --in {in_place!r}: picked \"\n f\"{_describe_division(picked)} over \"\n f\"{_describe_division(alt)}{more}. \"\n f\"Run `botmap where {in_place!r} --all` to see all.\",\n fg=\"yellow\", err=True,\n )\n return picked\n\n\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n # Only include defaults that are JSON-serializable\n if isinstance(param.default, (str, int, float, bool, list, tuple, type(None))):\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n# Earth's total surface area in square degrees (360 * 180).\nEARTH_AREA_SQ_DEG = 64800\n# Threshold (fraction of Earth) above which we warn about a large bbox.\nLARGE_BBOX_THRESHOLD = 0.01 # 1% of Earth\n\n# Overture type -> convenience verb that covers it with friendlier flags.\n# Used by `download` to nudge agents toward the higher-level verbs.\nTYPE_TO_VERB = {\n \"place\": \"places\",\n \"segment\": \"roads\",\n \"building\": \"buildings\",\n \"address\": \"addresses\",\n \"water\": \"water\",\n \"land_use\": \"landuse\",\n \"division_area\": \"boundary\",\n}\n\n\ndef _suggest_verb_command(\n verb: str, in_place, bbox, where_exprs, output_format, output\n) -> str:\n \"\"\"Build a concrete ready-to-run verb command from download flags.\"\"\"\n parts = [f\"botmap {verb}\"]\n if in_place:\n parts.append(f'--in \"{in_place}\"')\n elif bbox is not None:\n parts.append(f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\")\n leftover = []\n for expr in (where_exprs or []):\n if expr.startswith(\"categories.primary=\"):\n parts.append(f\"--category {expr.split('=', 1)[1]}\")\n elif expr.startswith(\"class=\"):\n parts.append(f\"--class {expr.split('=', 1)[1]}\")\n else:\n leftover.append(expr)\n for expr in leftover:\n parts.append(f'--where \"{expr}\"')\n if output_format:\n parts.append(f\"-f {output_format}\")\n if output:\n parts.append(f\"-o {output}\")\n return \" \".join(parts)\n\n\ndef _print_banner():\n try:\n import pyfiglet\n banner = pyfiglet.figlet_format(\"Overture Maps\", font=\"slant\")\n except Exception:\n banner = \"Overture Maps\\n\"\n version = importlib.metadata.version(\"botmap\")\n click.secho(banner.rstrip(), fg=\"blue\", bold=True, err=True)\n click.secho(f\" v{version} | overturemaps.org\\n\", fg=\"bright_blue\", err=True)\n\n\ndef _bbox_area_sq_deg(xmin: float, ymin: float, xmax: float, ymax: float) -> float:\n \"\"\"Return the area of a lon/lat bbox in square degrees.\"\"\"\n return abs(xmax - xmin) * abs(ymax - ymin)\n\n\nclass BboxParamType(click.ParamType):\n name = \"bbox\"\n\n def convert(self, value, param, ctx):\n parts = value.split(\",\")\n if len(parts) != 4:\n self.fail(\n f\"bbox requires exactly 4 values (xmin,ymin,xmax,ymax), \"\n f\"got {len(parts)}. Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n try:\n bbox = [float(x.strip()) for x in parts]\n except ValueError:\n self.fail(\n f\"All bbox values must be numbers. Got '{value}'. \"\n f\"Example: --bbox -71.10,42.34,-71.05,42.36\"\n )\n\n xmin, ymin, xmax, ymax = bbox\n\n # Validate longitude range\n if not (-180 <= xmin <= 180 and -180 <= xmax <= 180):\n self.fail(\n f\"Longitude values must be between -180 and 180. \"\n f\"Got xmin={xmin}, xmax={xmax}\"\n )\n\n # Validate latitude range\n if not (-90 <= ymin <= 90 and -90 <= ymax <= 90):\n self.fail(\n f\"Latitude values must be between -90 and 90. \"\n f\"Got ymin={ymin}, ymax={ymax}\"\n )\n\n # Check for swapped min/max\n if xmin > xmax:\n self.fail(\n f\"xmin ({xmin}) must be less than or equal to xmax ({xmax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n if ymin > ymax:\n self.fail(\n f\"ymin ({ymin}) must be less than or equal to ymax ({ymax}). \"\n f\"bbox format is: xmin,ymin,xmax,ymax\"\n )\n\n return bbox\n\n\ndef validate_release(ctx, param, value):\n \"\"\"Callback to validate release parameter against available releases.\"\"\"\n if value is None:\n return get_latest_release()\n\n available_releases, _ = get_available_releases()\n if value not in available_releases:\n raise click.UsageError(\n f\"Release '{value}' is no longer available. Overture keeps only the last \"\n f\"two monthly releases (~60 days) for GDPR compliance. Older releases are \"\n f\"automatically deleted from AWS S3 and Azure.\\n\\n\"\n f\"Available releases: {', '.join(available_releases)}\\n\"\n f\"See all past release notes at: https://docs.overturemaps.org/release-calendar\"\n )\n return value\n\n\ndef validate_gers_id(ctx, param, value):\n \"\"\"Callback to validate GERS ID is a valid UUID.\"\"\"\n if not value:\n raise click.BadParameter(\"GERS ID cannot be empty\")\n\n try:\n parsed_uuid = uuid.UUID(value)\n return str(parsed_uuid)\n except ValueError:\n raise click.BadParameter(f\"GERS ID must be a valid UUID. Got: '{value}'\")\n\n\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"botmap\"),\n prog_name=\"botmap\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n\n\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n required=True,\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\n \"-t\",\n \"--type\",\n \"type_\",\n type=click.Choice(get_all_overture_types()),\n required=True,\n)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\n@click.option(\n \"--stac/--no-stac\",\n required=False,\n type=bool,\n is_flag=True,\n default=True,\n help=\"By default, uses the STAC catalog to limit which Parquet files are downloaded. Pass --no-stac to skip the catalog and read the full S3 dataset directly.\",\n)\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(\n bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac,\n):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Steering hints: nudge toward the right tool when download isn't needed.\n verb = TYPE_TO_VERB.get(type_)\n if verb is not None:\n suggestion = _suggest_verb_command(\n verb, in_place, bbox, where_exprs, output_format, output\n )\n if type_ == \"division_area\":\n raise click.UsageError(\n f\"division_area is not downloadable this way \u2014 \"\n f\"for a boundary polygon run: {suggestion}\"\n )\n click.secho(\n f\"[botmap] Tip: try instead: {suggestion}\",\n fg=\"bright_black\", err=True,\n )\n elif type_ == \"infrastructure\":\n _TRANSIT_CLASSES = {\"bus_stop\", \"bus_station\", \"train_station\", \"transit\"}\n is_transit = any(\n (e.startswith(\"class=\") and e.split(\"=\", 1)[1].strip() in _TRANSIT_CLASSES)\n or e.startswith(\"subtype=transit\")\n for e in (where_exprs or [])\n )\n if is_transit:\n loc_flag = (\n f'--in \"{in_place}\"' if in_place\n else (f\"--bbox {bbox[0]},{bbox[1]},{bbox[2]},{bbox[3]}\" if bbox else \"--in \")\n )\n raise click.UsageError(\n f\"Transit stops are `place` features, not infrastructure \u2014 run: \"\n f\"botmap places --category bus_stop {loc_flag}\"\n )\n click.secho(\n \"[botmap] Tip: transit stops (bus_stop, bus_station, \"\n \"train_station) are `place` features \u2014 use \"\n \"`botmap places --category bus_stop`. \"\n \"For non-transit infrastructure, download is correct.\",\n fg=\"bright_black\", err=True,\n )\n\n # Resolve --in to bbox\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n loc = division.region or division.country or \"unknown\"\n pop = f\"pop {division.population:,}\" if division.population is not None else \"pop unknown\"\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {loc}, {pop})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = None\n if where_exprs:\n try:\n where_filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(\n f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\",\n bold=True,\n err=True,\n )\n return\n\n state = PipelineState(\n last_release=release,\n last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme,\n type=type_,\n bbox=(\n BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None\n else None\n ),\n backend=backend,\n output=output_path,\n )\n\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n\n\n@cli.command()\n@click.argument(\"gers_id\", required=True, callback=validate_gers_id)\n@click.option(\n \"-f\",\n \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=None,\n required=False,\n help=\"Output format. If not specified, only registry information will be displayed.\",\n)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\n@click.pass_context\ndef gers(ctx, gers_id, output_format, output, connect_timeout, request_timeout):\n \"\"\"\n Query the GERS registry for a feature by its GERS ID.\n\n By default, this command only queries the registry and displays\n information about the feature (version, filepath, bbox, etc.) without\n downloading the feature data.\n\n To download the actual feature data, specify an output format using -f/--format.\n \"\"\"\n from .core import query_gers_registry\n\n result = query_gers_registry(gers_id)\n\n if result is None:\n ctx.exit(1)\n\n if output_format is None:\n click.secho(\n f\"\\nRegistry lookup complete for GERS ID: {gers_id}\", fg=\"bright_black\", err=True\n )\n click.secho(\n \"To download the feature data, use -f/--format option.\", fg=\"bright_black\", err=True\n )\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n if output is None:\n output = sys.stdout\n\n reader = record_batch_reader_from_gers(\n gers_id, connect_timeout, request_timeout, registry_result=result\n )\n\n if reader is None:\n click.secho(\n f\"Could not fetch feature data for GERS ID '{gers_id}'\",\n fg=\"red\",\n err=True,\n )\n ctx.exit(1)\n\n with get_writer(output_format, output, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.option(\"--all\", \"show_all\", is_flag=True, default=False,\n help=\"Show all matching divisions, not just the best one.\")\n@click.option(\"--geometry\", \"--geojson\", \"geometry\", is_flag=True, default=False,\n help=\"Emit the division's polygon as a GeoJSON Feature on stdout \"\n \"(for clipping/spatial joins). Replaces `download -t \"\n \"division_area`.\")\n@click.pass_context\ndef where(ctx, query, show_all, geometry):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n matches = resolve(query)\n if not matches:\n try:\n pick = _resolve_in_place(query)\n matches = [pick]\n except click.UsageError as e:\n msg = str(e)\n if json_mode:\n _emit_error_json(msg, code=\"no_match\")\n else:\n click.secho(msg, fg=\"red\", err=True)\n ctx.exit(1)\n return\n pick = matches[0]\n\n if geometry:\n _emit_division_geometry(ctx, pick)\n return\n\n if json_mode:\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n def _print_one(d, prefix=\"\"):\n qual = d.region or d.country or \"?\"\n click.secho(f\"{prefix}{d.name}, {qual}\", bold=True)\n click.echo(f\" subtype: {d.subtype}\")\n click.echo(f\" bbox: {d.bbox[0]:.4f}, {d.bbox[1]:.4f}, \"\n f\"{d.bbox[2]:.4f}, {d.bbox[3]:.4f}\")\n if d.population is not None:\n click.echo(f\" population: {d.population:,}\")\n click.echo(f\" id: {d.id}\")\n\n if show_all:\n for i, d in enumerate(matches, start=1):\n _print_one(d, prefix=f\"[{i}] \")\n else:\n _print_one(pick)\n if len(matches) > 1:\n click.secho(\n f\"\\n ({len(matches) - 1} other match\"\n f\"{'es' if len(matches) - 1 != 1 else ''}; \"\n f\"rerun with --all to see them.)\",\n fg=\"yellow\",\n )\n\n\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef boundary(ctx, query):\n \"\"\"Emit a division's polygon as a GeoJSON Feature (for clipping/spatial joins).\n\n QUERY is a place name, e.g. 'Alameda County, CA' or 'Brooklyn, NY'.\n Outputs the division_area polygon on stdout \u2014 pipe to files or spatial tools.\n \"\"\"\n division = _resolve_in_place(query)\n _emit_division_geometry(ctx, division)\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n n = _safe_count(\n type_, bbox=bbox, release=release, stac=True, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [{\"key\": f.key, \"op\": f.op, \"value\": f.value} for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n\n\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n if sample is not None and isinstance(sample.get(\"geometry\"), (bytes, bytearray)):\n # Convert WKB to a GeoJSON geometry dict so agents can read it.\n try:\n import shapely\n import shapely.wkb\n geom = shapely.wkb.loads(sample[\"geometry\"])\n sample[\"geometry\"] = orjson.loads(shapely.to_geojson(geom))\n except Exception:\n sample[\"geometry\"] = sample[\"geometry\"].hex()\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(\n orjson.dumps(\n sample, default=_json_default, option=orjson.OPT_INDENT_2\n ).decode()\n )\n\n\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=str, default=\"place\", show_default=True,\n help=\"Feature type to enumerate. Only `place` is supported; \"\n \"other types use `class` \u2014 see `botmap schema -t TYPE`.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if type_ != \"place\":\n verb = TYPE_TO_VERB.get(type_)\n if verb:\n raise click.UsageError(\n f\"`categories` enumerates `categories.primary` for place features. \"\n f\"For `{type_}`, the classifying field is `class` \u2014 run \"\n f\"`botmap --json schema -t {type_}` to see available values, \"\n f\"or filter directly with `botmap {verb} --class `.\"\n )\n raise click.UsageError(\n f\"`categories` only enumerates `categories.primary` for place features. \"\n f\"Run `botmap --json schema -t {type_}` to inspect available fields.\"\n )\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\")\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": importlib.metadata.version(\"botmap\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef places(in_place, bbox, category, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n rows_written = copy(reader, writer)\n\n if rows_written == 0:\n # Zero-result hint: was a categories.primary filter the cause?\n # If so, suggest near-match values from the bbox's actual category list.\n cat_filters = [\n f for f in filters\n if f.key == \"categories.primary\" and f.op in (\"=\", \"in\")\n ]\n if cat_filters:\n target = cat_filters[0].value\n if isinstance(target, list):\n target = target[0] if target else None\n if target:\n hits = _suggest_categories(\"place\", bbox, release, str(target))\n if hits:\n click.secho(\n f\"[botmap] 0 rows. No place has \"\n f\"categories.primary={target!r} in this bbox. \"\n f\"Did you mean: {', '.join(hits)}? \"\n f\"Run `botmap categories -t place --bbox \u2026` \"\n f\"to see the full list.\",\n fg=\"yellow\", err=True,\n )\n else:\n click.secho(\n f\"[botmap] 0 rows. categories.primary={target!r} \"\n f\"is not present in this bbox. Run \"\n f\"`botmap categories -t place --bbox \u2026` \"\n f\"to see what's available.\",\n fg=\"yellow\", err=True,\n )\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef buildings(in_place, bbox, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download buildings in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs] or None\n except ValueError as e:\n raise click.UsageError(str(e))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef roads(in_place, bbox, road_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download road segments in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"water_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. ocean, lake, river, stream)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef water(in_place, bbox, water_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download water features (oceans, lakes, rivers, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if water_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=water_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"water\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--class\", \"landuse_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL \"\n \"(e.g. commercial, residential, recreation, agriculture)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef landuse(in_place, bbox, landuse_class, where_exprs, limit, output_format, output, release, json_no_op):\n \"\"\"Download land-use polygons (residential, commercial, ...) in a named place.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if landuse_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=landuse_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"land_use\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType(),\n help=\"Bounding box xmin,ymin,xmax,ymax. Mutually exclusive with --in.\")\n@click.option(\"--street\", required=False, type=str,\n help=\"Street name (case-insensitive substring). Example: --street Fountain\")\n@click.option(\"--number\", required=False, type=str,\n help=\"House/building number (exact match; field is a string, so \\\"1208\\\" or \\\"1208A\\\").\")\n@click.option(\"--postcode\", required=False, type=str,\n help=\"Postal code (exact match).\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", \"--limit\", \"limit\", default=None, type=int,\n help=\"Maximum number of features to emit (default: all matches).\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef addresses(in_place, bbox, street, number, postcode, where_exprs, limit,\n output_format, output, release, json_no_op):\n \"\"\"Find addresses in a named place or bbox.\n\n --street uses case-insensitive substring match (\"Fountain\" matches \"Fountain\n St\", \"Fountain Ave\", \"E Fountain Blvd\"). --number and --postcode are exact.\n For other fields, use --where.\n\n Requires --in or --bbox to keep queries bounded; the global address dataset\n is too large to scan unfiltered.\n \"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if bbox is None and in_place is None:\n raise click.UsageError(\"Provide --in or --bbox\")\n if in_place is not None:\n division = _resolve_in_place(in_place)\n bbox = list(division.bbox)\n else:\n bbox = list(bbox)\n\n try:\n filters = [parse_where_expr(e) for e in where_exprs]\n except ValueError as e:\n raise click.UsageError(str(e))\n if street is not None:\n filters.append(ParsedFilter(key=\"street\", op=\"~\", value=street))\n if number is not None:\n filters.append(ParsedFilter(key=\"number\", op=\"=\", value=str(number)))\n if postcode is not None:\n filters.append(ParsedFilter(key=\"postcode\", op=\"=\", value=str(postcode)))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = _safe_reader(\n \"address\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n if limit is not None:\n reader = _limit_reader(reader, limit)\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"-r\", \"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). \"\n \"Example: --where categories.primary=coffee_shop\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"--release\", default=None, callback=validate_release,\n required=False)\n@click.option(\"--json\", \"json_no_op\", is_flag=True, default=False, hidden=True)\ndef at(latlon, type_, n, radius, where_exprs, output_format, output, release, json_no_op):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n try:\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n except ValueError as e:\n raise click.UsageError(str(e))\n\n reader = _safe_reader(\n type_, bbox, release, None, None, True, where_filters=where_filters,\n )\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n kept_names = [n for n in reader.schema.names if n not in (\"bbox\",)]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in kept_names]\n )\n if reader.schema.metadata:\n new_schema = new_schema.with_metadata(reader.schema.metadata)\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n\n\ndef _get_division_area_files(release: str, candidate_bbox: tuple) -> list:\n \"\"\"Return S3 paths for division_area files that intersect candidate_bbox.\n\n Uses the STAC collections parquet (cached per process) to restrict the\n file list so we only open the 1-3 files relevant to a given candidate\n instead of all 8 in the partition.\n\n candidate_bbox is (xmin, ymin, xmax, ymax).\n \"\"\"\n import io\n import pyarrow.parquet as _pq\n import pyarrow.compute as _pc\n from urllib.request import urlopen\n\n stac_cache = _get_division_area_files._stac_cache # type: ignore[attr-defined]\n stac_table = stac_cache.get(release)\n if stac_table is None:\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n with urlopen(stac_url) as response:\n buf = io.BytesIO(response.read())\n stac_table = _pq.read_table(buf)\n except Exception:\n stac_table = None\n stac_cache[release] = stac_table\n\n if stac_table is None:\n # STAC unavailable \u2014 return None to signal fallback to full partition\n return []\n\n xmin, ymin, xmax, ymax = candidate_bbox\n type_filter = (\n (_pc.field(\"collection\") == \"division_area\")\n & (_pc.field(\"type\") == \"Feature\")\n )\n bbox_filter = (\n (_pc.field(\"bbox\", \"xmin\") < xmax)\n & (_pc.field(\"bbox\", \"xmax\") > xmin)\n & (_pc.field(\"bbox\", \"ymin\") < ymax)\n & (_pc.field(\"bbox\", \"ymax\") > ymin)\n )\n rows = stac_table.filter(type_filter & bbox_filter).to_pylist()\n result = []\n for r in rows:\n try:\n href = r[\"assets\"][\"aws\"][\"alternate\"][\"s3\"][\"href\"]\n result.append(href[len(\"s3://\"):])\n except (KeyError, TypeError):\n continue\n return result\n\n\n_get_division_area_files._stac_cache = {} # type: ignore[attr-defined]\n\n\ndef _prefetch_polygons(\n division_ids: list[str],\n lon: float,\n lat: float,\n release: str,\n) -> None:\n \"\"\"Batch-fetch division_area polygons into the _polygon_contains cache.\"\"\"\n import shapely.wkb\n import pyarrow.dataset as _ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n from shapely.ops import unary_union\n\n cache = _polygon_cache\n uncached = [did for did in division_ids if did not in cache]\n if not uncached:\n return\n\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = _ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\").isin(uncached)\n table = dataset.to_table(columns=[\"division_id\", \"geometry\"], filter=filter_expr)\n\n by_id: dict[str, list] = {did: [] for did in uncached}\n for row in table.to_pylist():\n by_id.setdefault(row[\"division_id\"], []).append(row[\"geometry\"])\n\n for did in uncached:\n geom_blobs = by_id.get(did, [])\n if geom_blobs:\n geoms = [shapely.wkb.loads(b) for b in geom_blobs]\n cache[did] = unary_union(geoms)\n else:\n cache[did] = None\n\n\ndef _polygon_contains(\n division_id: str,\n lon: float,\n lat: float,\n candidate_bbox: tuple | None = None,\n geometry_wkb: bytes | None = None,\n) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n When `geometry_wkb` is supplied (pre-unioned WKB from a local cache),\n no S3 I/O is performed \u2014 the polygon is decoded from the bytes directly.\n\n When `geometry_wkb` is absent the function fetches from the `division_area`\n S3 partition, using STAC-based file selection via `candidate_bbox` to limit\n the number of Parquet files opened.\n\n Results are cached per-process by `division_id`.\n \"\"\"\n import shapely.wkb\n\n cache = _polygon_cache\n if division_id in cache:\n poly = cache[division_id]\n elif geometry_wkb is not None:\n # Fast path: geometry provided by caller (e.g. from local geom cache).\n poly = shapely.wkb.loads(geometry_wkb)\n cache[division_id] = poly\n else:\n # Fetch from S3, using STAC to restrict which files to open.\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n\n release = get_latest_release()\n fs = _fs.S3FileSystem(\n anonymous=True, region=\"us-west-2\",\n connect_timeout=30, request_timeout=120,\n )\n\n if candidate_bbox is not None:\n file_paths = _get_division_area_files(release, candidate_bbox)\n else:\n file_paths = []\n\n if file_paths:\n dataset = ds.dataset(file_paths, filesystem=fs, format=\"parquet\")\n else:\n path = (\n f\"overturemaps-us-west-2/release/{release}\"\n \"/theme=divisions/type=division_area/\"\n )\n dataset = ds.dataset(path, filesystem=fs)\n\n filter_expr = (\n (_pc.field(\"division_id\") == division_id)\n & (_pc.field(\"bbox\", \"xmin\") <= lon)\n & (_pc.field(\"bbox\", \"xmax\") >= lon)\n & (_pc.field(\"bbox\", \"ymin\") <= lat)\n & (_pc.field(\"bbox\", \"ymax\") >= lat)\n )\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_cache: dict[str, object] = {}\n\n\ndef _emit_division_geometry(ctx, division) -> None:\n \"\"\"Fetch `division`'s division_area polygon and print it as a GeoJSON\n Feature on stdout. Raises click.UsageError if no polygon is available.\n\n Reuses the same `_prefetch_polygons` / division_area S3 path as\n `containing`, so callers get a boundary for clipping or spatial joins\n without resorting to `download -t division_area`.\n \"\"\"\n from shapely.geometry import mapping\n\n release = get_latest_release()\n _prefetch_polygons([division.id], 0.0, 0.0, release)\n poly = _polygon_cache.get(division.id)\n if poly is None:\n raise click.UsageError(\n f\"No division_area polygon found for \"\n f\"{_describe_division(division)} (id {division.id}).\"\n )\n feature = {\n \"type\": \"Feature\",\n \"geometry\": mapping(poly),\n \"properties\": {\n \"id\": division.id,\n \"name\": division.name,\n \"subtype\": division.subtype,\n \"country\": division.country,\n \"region\": division.region,\n },\n }\n _emit_json(ctx, feature)\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n lat, lon = _parse_latlon(latlon)\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Pre-fetch all candidate polygons in a single S3 call, then test containment.\n _prefetch_polygons(\n [c[\"id\"] for c in candidates], lon, lat, release,\n )\n matches = [\n c for c in candidates\n if _polygon_contains(\n c[\"id\"], lon, lat,\n candidate_bbox=(\n c[\"bbox_xmin\"], c[\"bbox_ymin\"], c[\"bbox_xmax\"], c[\"bbox_ymax\"]\n ),\n geometry_wkb=c.get(\"geometry_wkb\"),\n )\n ]\n # Innermost (highest admin_level) first; treat None as 0\n matches.sort(key=lambda c: c[\"admin_level\"] or 0, reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n\n\n@cli.group()\ndef releases():\n \"\"\"Manage and query Overture Maps releases.\"\"\"\n pass\n\n\n@releases.command(name=\"list\")\ndef releases_list():\n \"\"\"List all available Overture Maps releases.\"\"\"\n all_releases = list_releases()\n if not all_releases:\n click.secho(\"No releases found.\", fg=\"red\", err=True)\n return\n for i, release in enumerate(all_releases):\n if i == 0:\n click.secho(release, fg=\"cyan\", bold=True) # latest\n else:\n click.echo(release)\n\n\n@releases.command(name=\"latest\")\ndef releases_latest():\n \"\"\"Show the latest Overture Maps release.\"\"\"\n latest = get_latest_release()\n click.secho(latest, fg=\"cyan\", bold=True)\n\n\n@cli.group()\ndef changelog():\n \"\"\"Query the GERS changelog for feature changes.\"\"\"\n pass\n\n\n@changelog.command(name=\"query\")\n@click.option(\"--bbox\", required=True, type=BboxParamType())\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_query(bbox, theme, type_, release):\n \"\"\"Query changelog for changes within a bounding box.\n\n Examples:\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings --type=building\n botmap changelog query --bbox=-97.8,30.2,-97.6,30.4 --theme=buildings\n \"\"\"\n bbox_obj = BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n\n if theme and type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"--type\")\n themes_types = [(theme, type_)]\n elif theme:\n types = [t for t, th in type_theme_map.items() if th == theme]\n themes_types = [(theme, t) for t in types]\n elif type_:\n if type_ not in type_theme_map:\n raise click.BadParameter(f\"Unknown type '{type_}'\", param_hint=\"type\")\n theme = type_theme_map[type_]\n themes_types = [(theme, type_)]\n else:\n raise click.UsageError(\"Must specify at least --theme or --type\")\n\n total_added = 0\n total_modified = 0\n total_deleted = 0\n\n click.secho(f\"Querying changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n for theme_name, type_name in themes_types:\n changes = query_changelog_ids(release, theme_name, type_name, bbox_obj)\n\n added = len(changes.get(\"added\", set()))\n modified = len(changes.get(\"data_changed\", set()))\n deleted = len(changes.get(\"removed\", set()))\n\n total_added += added\n total_modified += modified\n total_deleted += deleted\n\n if added + modified + deleted > 0:\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n click.secho(f\" Added: {added}\", fg=\"green\")\n click.secho(f\" Modified: {modified}\", fg=\"yellow\")\n click.secho(f\" Deleted: {deleted}\", fg=\"red\")\n click.echo()\n\n if len(themes_types) > 1:\n click.secho(\"Total:\", bold=True)\n click.secho(f\" Added: {total_added}\", fg=\"green\", bold=True)\n click.secho(f\" Modified: {total_modified}\", fg=\"yellow\", bold=True)\n click.secho(f\" Deleted: {total_deleted}\", fg=\"red\", bold=True)\n\n\n@changelog.command(name=\"summary\")\n@click.option(\"--theme\", required=False, type=str)\n@click.option(\"--type\", \"type_\", required=False, type=str)\n@click.option(\n \"-r\",\n \"--release\",\n default=None,\n callback=validate_release,\n required=False,\n help=\"Release version (defaults to latest)\",\n)\ndef changelog_summary(theme, type_, release):\n \"\"\"Get aggregate statistics for changelog without bbox filtering.\n\n Examples:\n botmap changelog summary --theme=buildings\n botmap changelog summary --type=building\n botmap changelog summary # All themes/types\n \"\"\"\n click.secho(f\"Summarizing changelog for release {release}...\", fg=\"bright_black\")\n click.echo()\n\n try:\n results = summarize_changelog(release, theme, type_)\n except ValueError as e:\n raise click.BadParameter(str(e))\n\n grand_totals = {}\n\n for theme_name, types_data in results.items():\n for type_name, change_counts in types_data.items():\n click.secho(f\"{theme_name}/{type_name}:\", bold=True)\n for change_type, count in sorted(change_counts.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg)\n grand_totals[change_type] = grand_totals.get(change_type, 0) + count\n click.echo()\n\n if len(results) > 1 or (len(results) == 1 and len(list(results.values())[0]) > 1):\n click.secho(\"Grand Total:\", bold=True)\n for change_type, count in sorted(grand_totals.items()):\n fg = {\"added\": \"green\", \"data_changed\": \"yellow\", \"removed\": \"red\"}.get(\n change_type\n )\n click.secho(f\" {change_type}: {count}\", fg=fg, bold=True)\n\n\n@releases.command(name=\"check\")\n@click.option(\"-o\", \"--output\", required=True, type=click.Path(exists=True))\n@click.pass_context\ndef releases_check(ctx, output):\n \"\"\"Check if a local file is up to date with the latest release.\"\"\"\n state_path = get_state_path(output)\n state = load_state(state_path)\n\n if state is None:\n click.secho(f\"No state file found at {state_path}\", fg=\"red\", err=True)\n click.secho(\"Cannot determine current release version.\", fg=\"red\", err=True)\n ctx.exit(1)\n\n latest = get_latest_release()\n\n click.echo(\n \"Current release: \" + click.style(state.last_release, fg=\"cyan\", bold=True)\n )\n click.echo(\"Latest release: \" + click.style(latest, fg=\"cyan\", bold=True))\n\n if state.last_release == latest:\n click.secho(\"\u2713 Up to date\", fg=\"green\", bold=True)\n ctx.exit(0)\n else:\n click.secho(\"\u2717 Update available\", fg=\"yellow\", bold=True)\n ctx.exit(1)\n\n\n@releases.command(name=\"exists\")\n@click.argument(\"release\")\ndef releases_exists(release):\n \"\"\"Check whether a release exists.\"\"\"\n if not release_exists(release):\n raise click.ClickException(f\"Release '{release}' not found\")\n click.secho(\"true\", fg=\"green\")\n\n\nif __name__ == \"__main__\":\n cli()\n", + "botmap/core.py": "import io\nimport json\nimport sys\nfrom typing import List, Optional, Tuple\nfrom urllib.request import urlopen\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as fs\nimport pyarrow.parquet as pq\n\nfrom .models import BBox\n\nSTAC_CATALOG_URL = \"https://stac.overturemaps.org/catalog.json\"\n\n# Cache for STAC catalog to avoid repeated network calls\n_cached_stac_catalog = None\n\n# Allows for optional import of additional dependencies\ntry:\n from geopandas import GeoDataFrame\n\n HAS_GEOPANDAS = True\nexcept ImportError:\n HAS_GEOPANDAS = False\n\n class GeoDataFrame:\n pass\n\n\ndef _get_stac_catalog() -> dict:\n \"\"\"\n Fetch and cache the STAC catalog.\n\n Returns\n -------\n dict: The STAC catalog JSON\n \"\"\"\n global _cached_stac_catalog\n\n if _cached_stac_catalog is not None:\n return _cached_stac_catalog\n\n try:\n with urlopen(STAC_CATALOG_URL) as response:\n catalog = json.load(response)\n\n # Cache the catalog\n _cached_stac_catalog = catalog\n return catalog\n\n except Exception as e:\n raise Exception(f\"Could not fetch STAC catalog: {e}\") from e\n\n\ndef get_available_releases() -> Tuple[List[str], str]:\n \"\"\"\n Fetch available releases from the STAC catalog.\n\n Returns\n -------\n Tuple of (all_releases, latest_release) where:\n - all_releases is a list of release version strings\n - latest_release is the latest release version string\n \"\"\"\n catalog = _get_stac_catalog()\n\n latest_release = catalog.get(\"latest\")\n\n # Extract release versions from the child links\n releases = []\n for link in catalog.get(\"links\", []):\n if link.get(\"rel\") == \"child\":\n href = link.get(\"href\", \"\")\n # href format is \"./2025-09-24.0/catalog.json\"\n release_version = href.strip(\"./\").split(\"/\")[0]\n if release_version:\n releases.append(release_version)\n\n return releases, latest_release\n\n\ndef get_latest_release() -> str:\n \"\"\"\n Get the latest release version.\n\n Returns\n -------\n str: The latest release version\n \"\"\"\n _, latest = get_available_releases()\n return latest\n\n\n# For backwards compatibility, expose ALL_RELEASES as a list\n# This will be populated dynamically when first accessed\ndef _get_all_releases():\n releases, _ = get_available_releases()\n return releases\n\n\n# Lazy evaluation property-like access\nclass _ReleasesProxy:\n def __getitem__(self, index):\n return _get_all_releases()[index]\n\n def __iter__(self):\n return iter(_get_all_releases())\n\n def __len__(self):\n return len(_get_all_releases())\n\n def __repr__(self):\n return repr(_get_all_releases())\n\n\nALL_RELEASES = _ReleasesProxy()\n\n\ndef _coerce_bbox(\n bbox: BBox | tuple[float, float, float, float] | list[float] | None,\n) -> BBox | None:\n \"\"\"Normalize bbox input to a BBox instance.\"\"\"\n if bbox is None:\n return None\n\n if isinstance(bbox, BBox):\n return bbox\n\n if len(bbox) != 4:\n raise ValueError(\"bbox must contain exactly 4 numeric values\")\n\n return BBox(\n xmin=float(bbox[0]),\n ymin=float(bbox[1]),\n xmax=float(bbox[2]),\n ymax=float(bbox[3]),\n )\n\n\ndef _get_files_from_stac(\n theme: str, overture_type: str, bbox: BBox, release: str\n) -> Optional[List[str]]:\n \"\"\"\n Returns a list of bucket/key paths using the STAC-geoparquet index\n \"\"\"\n stac_url = f\"https://stac.overturemaps.org/{release}/collections.parquet\"\n try:\n # Arrow can't read HTTP URLs directly; read into memory first\n with urlopen(stac_url) as response:\n data = response.read()\n buffer = io.BytesIO(data)\n stac_table = pq.read_table(buffer)\n\n feature_type_filter = (pc.field(\"collection\") == overture_type) & (\n pc.field(\"type\") == \"Feature\"\n )\n\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n combined_filter = feature_type_filter & bbox_filter\n table = stac_table.filter(combined_filter)\n\n if table.num_rows > 0:\n file_paths = table.column(\"assets\").to_pylist()\n\n # clip out the \"s3://\" prefix\n s3_paths = [\n path[\"aws\"][\"alternate\"][\"s3\"][\"href\"][len(\"s3://\") :]\n for path in file_paths\n ]\n return s3_paths\n else:\n print(\n f\"No data found for release {release} in query bbox {bbox.as_tuple()}.\"\n )\n return []\n\n except Exception as e:\n print(f\"Error reading STAC index at {stac_url}: {e}\")\n return None\n\n\ndef _record_batch_reader_from_dataset(\n dataset: ds.Dataset,\n filter_expr=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Create a RecordBatchReader from an S3 dataset with optional filtering.\n\n Parameters\n ----------\n dataset: pyarrow dataset\n Dataset to read from\n filter_expr: pyarrow expression, optional\n Filter to apply when reading the dataset\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if error occurs\n \"\"\"\n try:\n batches = dataset.to_batches(\n filter=filter_expr,\n use_threads=True,\n batch_readahead=16,\n fragment_readahead=4,\n )\n\n # Filter out empty batches to avoid downstream issues\n non_empty_batches = (b for b in batches if b.num_rows > 0)\n\n geoarrow_schema = geoarrow_schema_adapter(dataset.schema)\n return pa.RecordBatchReader.from_batches(geoarrow_schema, non_empty_batches)\n\n except Exception as e:\n print(f\"Error reading dataset: {e}\")\n return None\n\n\ndef _prepare_query(\n overture_type,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[Tuple[ds.Dataset, Optional[pc.Expression]]]:\n \"\"\"\n Resolve the S3 dataset and filter expression for a given query.\n\n Returns the dataset and filter expression ready for counting or streaming,\n or None if STAC reports no files intersect the bbox.\n \"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n\n\ndef count_rows(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> int:\n \"\"\"Return the number of rows matching the given parameters.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\n\ndef record_batch_reader(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"Return a pyarrow RecordBatchReader for the desired bounding box and s3 path, or None on error.\"\"\"\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n\n\ndef geodataframe(\n overture_type: str,\n bbox: BBox | tuple[float, float, float, float] | list[float] | None = None,\n release: str = None,\n connect_timeout: int = None,\n request_timeout: int = None,\n stac: bool = False,\n) -> GeoDataFrame:\n \"\"\"\n Loads geoparquet for specified type into a geopandas dataframe\n\n Parameters\n ----------\n overture_type: type to load\n bbox: optional bounding box for data fetch (xmin, ymin, xmax, ymax)\n connect_timeout: optional connection timeout in seconds\n request_timeout: optional request timeout in seconds\n\n Returns\n -------\n GeoDataFrame with the optionally filtered theme data\n\n \"\"\"\n if not HAS_GEOPANDAS:\n raise ImportError(\"geopandas is required to use this function\")\n\n reader = record_batch_reader(\n overture_type,\n bbox=bbox,\n release=release,\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n stac=stac,\n )\n return GeoDataFrame.from_arrow(reader)\n\n\ndef geoarrow_schema_adapter(schema: pa.Schema) -> pa.Schema:\n \"\"\"\n Convert a geoarrow-compatible schema to a proper geoarrow schema\n\n This assumes there is a single \"geometry\" column with WKB formatting\n\n Parameters\n ----------\n schema: pa.Schema\n\n Returns\n -------\n pa.Schema\n A copy of the input schema with the geometry field replaced with\n a new one with the proper geoarrow ARROW:extension metadata\n\n \"\"\"\n geometry_field_index = schema.get_field_index(\"geometry\")\n geometry_field = schema.field(geometry_field_index)\n geoarrow_geometry_field = geometry_field.with_metadata(\n {b\"ARROW:extension:name\": b\"geoarrow.wkb\"}\n )\n\n geoarrow_schema = schema.set(geometry_field_index, geoarrow_geometry_field)\n\n return geoarrow_schema\n\n\ntype_theme_map = {\n \"address\": \"addresses\",\n \"bathymetry\": \"base\",\n \"building\": \"buildings\",\n \"building_part\": \"buildings\",\n \"division\": \"divisions\",\n \"division_area\": \"divisions\",\n \"division_boundary\": \"divisions\",\n \"place\": \"places\",\n \"segment\": \"transportation\",\n \"connector\": \"transportation\",\n \"infrastructure\": \"base\",\n \"land\": \"base\",\n \"land_cover\": \"base\",\n \"land_use\": \"base\",\n \"water\": \"base\",\n}\n\n\ndef _dataset_path(overture_type: str, release: str) -> str:\n \"\"\"\n Returns the s3 path of the Overture dataset to use. This assumes overture_type has\n been validated, e.g. by the CLI\n\n \"\"\"\n # Map of sub-partition \"type\" to parent partition \"theme\" for forming the\n # complete s3 path. Could be discovered by reading from the top-level s3\n # location but this allows to only read the files in the necessary partition.\n theme = type_theme_map[overture_type]\n return (\n f\"overturemaps-us-west-2/release/{release}/theme={theme}/type={overture_type}/\"\n )\n\n\ndef get_all_overture_types() -> List[str]:\n return list(type_theme_map.keys())\n\n\n# Registry manifest is now part of the STAC catalog\n# Access via catalog.json -> registry property -> manifest field\n\n\ndef _binary_search_manifest(\n manifest_tuples: List[Tuple[str, str]], gers_id: str\n) -> Optional[str]:\n \"\"\"\n Binary search through manifest tuples to find the file containing the given GERS ID.\n\n Parameters\n ----------\n manifest_tuples: List of (filename, max_id) tuples, sorted by max_id\n gers_id: The GERS ID to search for (lowercase)\n\n Returns\n -------\n Filename containing the ID, or None if not found\n \"\"\"\n left, right = 0, len(manifest_tuples) - 1\n\n while left <= right:\n mid = (left + right) // 2\n filename, max_id = manifest_tuples[mid]\n\n if gers_id <= max_id:\n # Check if this is the first file where max_id >= gers_id\n if mid == 0 or manifest_tuples[mid - 1][1] < gers_id:\n return filename\n else:\n # Search in the left half\n right = mid - 1\n else:\n # Search in the right half\n left = mid + 1\n\n return None\n\n\ndef query_gers_registry(gers_id: str) -> Optional[Tuple[str, BBox | None]]:\n \"\"\"\n Query the GERS registry to get the filepath and bbox for a given GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n\n Returns\n -------\n Tuple of (filepath, bbox) where bbox is a BBox, or None if not found\n \"\"\"\n import sys\n\n release = get_latest_release()\n release_path = f\"overturemaps-us-west-2/release/{release}\"\n gers_id_lower = gers_id.lower()\n\n try:\n # Get the cached STAC catalog\n catalog = _get_stac_catalog()\n\n # Get the registry object from the catalog\n registry = catalog.get(\"registry\")\n if registry is None:\n print(\"Registry configuration not found in STAC catalog\", file=sys.stderr)\n return None\n\n # The registry contains 'path' and 'manifest'\n # manifest is a list of [filename, max_id] tuples\n registry_path = registry.get(\"path\", \"\")\n manifest_tuples = registry.get(\"manifest\", [])\n\n if not manifest_tuples:\n print(\"Registry manifest is empty in STAC catalog\", file=sys.stderr)\n return None\n\n # Use binary search to find the file containing this GERS ID\n registry_file = _binary_search_manifest(manifest_tuples, gers_id_lower)\n\n if registry_file is None:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Read the specific registry file with filter (predicate pushdown)\n # This only reads the relevant row groups instead of the entire file\n registry_path = f\"overturemaps-us-west-2/registry/{registry_file}\"\n filesystem = fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n\n # Use filters parameter for predicate pushdown\n filtered_table = pq.read_table(\n registry_path, filesystem=filesystem, filters=[(\"id\", \"=\", gers_id_lower)]\n )\n\n if filtered_table.num_rows == 0:\n print(f\"{gers_id} does not exist in the GERS Registry.\", file=sys.stderr)\n return None\n\n # Get the first (should be only) result\n row = filtered_table.to_pylist()[0]\n path = row[\"path\"]\n bbox_struct = row.get(\"bbox\")\n version = row.get(\"version\")\n first_seen = row.get(\"first_seen\")\n last_seen = row.get(\"last_seen\")\n last_changed = row.get(\"last_changed\")\n\n # Check if path is NULL - means feature is not present in current release\n if path is None:\n print(\n f\"GERS ID '{gers_id}' found in registry but not present in release {release}\",\n file=sys.stderr,\n )\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n return None\n\n # Construct full filepath\n if not path.startswith(\"/\"):\n path = \"/\" + path\n filepath = f\"{release_path}{path}\"\n\n # Extract bbox values if available\n if bbox_struct is not None:\n bbox = BBox(\n xmin=bbox_struct[\"xmin\"],\n ymin=bbox_struct[\"ymin\"],\n xmax=bbox_struct[\"xmax\"],\n ymax=bbox_struct[\"ymax\"],\n )\n else:\n bbox = None\n\n # Write registry information to stderr\n print(f\"Found GERS ID '{gers_id}' in release {release}\", file=sys.stderr)\n print(f\" Version: {version}\", file=sys.stderr)\n print(f\" Filepath: s3://{filepath}\", file=sys.stderr)\n if bbox is not None:\n print(\n f\" Bbox: [{bbox.xmin:.6f}, {bbox.ymin:.6f}, {bbox.xmax:.6f}, {bbox.ymax:.6f}]\",\n file=sys.stderr,\n )\n else:\n print(f\" Bbox: None\", file=sys.stderr)\n print(f\" First seen: {first_seen}\", file=sys.stderr)\n print(f\" Last seen: {last_seen}\", file=sys.stderr)\n if last_changed:\n print(f\" Last changed: {last_changed}\", file=sys.stderr)\n\n return (filepath, bbox)\n\n except Exception as e:\n print(f\"Error querying GERS registry: {e}\", file=sys.stderr)\n return None\n\n\ndef record_batch_reader_from_gers(\n gers_id: str,\n connect_timeout: int = None,\n request_timeout: int = None,\n registry_result: Optional[Tuple[str, BBox | None]] = None,\n) -> Optional[pa.RecordBatchReader]:\n \"\"\"\n Return a pyarrow RecordBatchReader for a specific GERS ID.\n\n The registry always uses the latest release.\n\n Parameters\n ----------\n gers_id: The GERS ID to look up\n connect_timeout: Optional connection timeout in seconds\n request_timeout: Optional request timeout in seconds\n registry_result: Optional pre-fetched registry result (filepath, bbox)\n to avoid duplicate registry queries\n\n Returns\n -------\n RecordBatchReader with the feature data, or None if not found\n \"\"\"\n # Use pre-fetched result if provided, otherwise query the registry\n if registry_result is None:\n result = query_gers_registry(gers_id)\n if result is None:\n return None\n else:\n result = registry_result\n\n filepath, bbox = result\n\n # Build filter expression based on ID and bbox (if available)\n filter_expr = pc.field(\"id\") == gers_id.lower()\n\n if bbox is not None:\n xmin, ymin, xmax, ymax = bbox.as_tuple()\n bbox_filter = (\n (pc.field(\"bbox\", \"xmin\") == xmin)\n & (pc.field(\"bbox\", \"ymin\") == ymin)\n & (pc.field(\"bbox\", \"xmax\") == xmax)\n & (pc.field(\"bbox\", \"ymax\") == ymax)\n )\n filter_expr = filter_expr & bbox_filter\n\n try:\n dataset = ds.dataset(\n filepath,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n except Exception as e:\n print(f\"Error opening dataset for GERS ID '{gers_id}': {e}\", file=sys.stderr)\n return None\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n", + "botmap/data/__init__.py": "", + "botmap/data/skill.md": "---\nname: botmap\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in Brooklyn\", \"find hospitals in Manhattan\", \"show tall buildings in Chicago\", \"what are the main roads in Berlin\", \"what's the bounding box of Boston\".\n---\n\n# Overture Maps CLI\n\nThe `botmap` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in Brooklyn?\"* \u2192 `where` + `count -t place --in Brooklyn --where categories.primary=coffee_shop`\n- *\"Find hospitals in Manhattan\"* \u2192 `places --in \"Manhattan\" --category hospital`\n- *\"Show buildings taller than 100m in Chicago\"* \u2192 `buildings --in \"Chicago, IL\" --where 'height>100'`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, USA\" --class motorway`\n- *\"Where are the bike paths in Alameda County?\"* \u2192 `roads --in \"Alameda County, CA\" --class cycleway`\n- *\"Find the lakes near Minneapolis\"* \u2192 `water --in \"Minneapolis, MN\" --class lake`\n- *\"Map residential zoning in Brooklyn\"* \u2192 `landuse --in \"Brooklyn, NY\" --class residential`\n- *\"What admin area is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\n**Note on place names:** Overture's divisions index stores `name_primary` in\nthe local script (e.g. Tokyo is `\u6771\u4eac\u90fd`, not `Tokyo`). For non-Latin cities,\nprefer the local-script form, use `containing LAT,LON` with coordinates, or\nfall back to `--bbox`. The `where` command's qualifier syntax is\n`\"Place, ST\"`, `\"Place, US-ST\"`, `\"Place, Full State Name\"`, `\"Place, CC\"`\n(alpha-2), `\"Place, CCC\"` (alpha-3), or `\"Place, Country Name\"` \u2014 e.g. all of\nthese resolve Boston: `\"Boston, MA\"`, `\"Boston, Massachusetts\"`,\n`\"Boston, US-MA\"`, `\"Boston, US\"`, `\"Boston, USA\"`, `\"Boston, United States\"`.\n\nNegative examples (do NOT reach for botmap):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `botmap --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Troubleshooting flow (work the problem in this order)\n\nMost place-based questions resolve with this sequence \u2014 don't jump straight\nto `download`:\n\n1. **Resolve the place.** `botmap --json where \"Place, ST\"`. Check the\n `name`, `country`, and `region` in the output match what you meant \u2014 a\n bare 2-letter qualifier can be ambiguous (e.g. \"Santa Barbara, CA\"). If it\n resolved to the wrong country/region, re-run with an explicit qualifier\n like `\"Santa Barbara, US-CA\"`. The `--json` output also carries a\n `candidates` array; `where \u2026 --all` lists every match.\n2. **Place not in the divisions index?** `where` falls back to a parent and\n prints a yellow `[botmap]` warning on **stderr** naming what it used.\n Read that warning. If the fallback is wrong or too coarse (e.g. a\n neighborhood resolving to a whole country), skip `--in` and pass an\n approximate `--bbox xmin,ymin,xmax,ymax` instead.\n3. **Count before pulling.** `botmap --json count -t TYPE --in \"\u2026\"`.\n4. **Too many results?** Add `--where` / `--category` / `--class` filters, or\n narrow the area with a tighter `--bbox`. Too few (or zero)? Widen the\n `--bbox`, drop a filter, or check `categories`/`schema` for the right value.\n5. **Preview, then pull.** `sample -n 5` (or any verb with `-n`) to confirm\n shape, then run the verb to get the full set.\n\n## Limiting and proximity\n\n- **`-n` / `--limit` caps the output of `sample`, `at`, and every\n convenience verb** (`places`, `buildings`, `roads`, `water`, `landuse`,\n `addresses`). `botmap places --in \"\u2026\" -n 20` emits at most 20 features.\n Without `-n`, these stream **all** matches (pipe or `-o` them). (The\n low-level `download` command has no `-n`; use a convenience verb or\n `sample` when you want to limit.)\n- **\"Near a point\" \u2192 use `at`, not a verb.** `botmap at LAT,LON -t place -n 10`\n returns the N features actually *closest* to the point, sorted by distance.\n The `--in` / `--bbox` verbs filter by bounding box, so \"near\" there means\n \"inside the box\" \u2014 results are **not** distance-ordered.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\nbotmap --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\nbotmap --json count -t building --in \"Manhattan\"\n# {\"count\": 50000+, ...}\n# Add filters to narrow if the count is too large.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\nbotmap sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\nbotmap places --in \"Brooklyn\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\n# Single-quote any --where with < or > so the shell doesn't treat it as a\n# redirection (see Anti-patterns).\nbotmap buildings --in \"Manhattan\" --where 'height>150' \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Transportation segments (cars, bikes, foot)\n```bash\n# `roads` returns ALL transportation segments, not just car roads. Use\n# --class to pick motorway / primary / residential / footway / path / cycleway.\nbotmap roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n\n# Bike paths / cycleways:\nbotmap roads --in \"Alameda County, CA\" --class cycleway \\\n -f geojsonseq -o bikepaths.jsonl\n```\n\n### 7. What's near a point (distance-sorted)\n```bash\n# `at` returns the N features CLOSEST to the point, ordered by distance \u2014\n# this is the tool for \"near X\" questions. --radius (meters) bounds the\n# search; --category / --where filter it.\nbotmap at 40.7484,-73.9857 -t place -n 10\nbotmap at 40.7484,-73.9857 -t place --category pharmacy --radius 250 -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\nbotmap --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\nbotmap --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\nbotmap --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(botmap --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\nbotmap download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\nbotmap --json cache info # is the divisions index current?\nbotmap cache build # force rebuild against latest release\nbotmap cache clear # nuke local cache\n```\n\n### 13. Water features (oceans, lakes, rivers)\n```bash\nbotmap water --in \"Minneapolis, MN\" --class lake \\\n -f geojsonseq -o lakes.jsonl\n```\n\n### 14. Land use (zoning-style polygons)\n```bash\nbotmap landuse --in \"Brooklyn, NY\" --class residential \\\n -f geojsonseq -o residential.jsonl\n```\n\n### 15. Bus stops and other transit POIs\n```bash\n# Transit stops are PLACES (categories.primary), not infrastructure.\nbotmap places --in \"Williamsburg, NY\" --category bus_stop \\\n -f geojsonseq -o busstops.jsonl\n```\n\n### 16. Get a division's boundary polygon (for clipping / spatial joins)\n```bash\n# Emits a GeoJSON Feature with the division_area polygon \u2014 the supported way\n# to get a boundary. Don't use `download -t division_area` for this.\nbotmap where \"Alameda County, CA\" --geometry > county.geojson\n```\n\n### 17. Address lookups\n```bash\n# --street is a case-insensitive SUBSTRING match (\"Fountain\" matches \"Fountain\n# St\", \"E Fountain Blvd\"); --number and --postcode are exact. Requires --in or\n# --bbox. For other address fields, use --where.\nbotmap addresses --in \"Boston, MA\" --street \"Beacon\" -n 20\nbotmap addresses --bbox -71.07,42.35,-71.06,42.36 --postcode 02108\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, **bus_stop, bus_station, train_station**, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` \u2014 covers ALL segments, not just car roads: motorway, primary, secondary, residential, **footway, path, cycleway**, sidewalk; plus `subclass`, `surface`, `speed_limits`. Use the `roads` verb with `--class`. |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population`. Use `where \u2026 --geometry` for the boundary polygon. |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...). Use the `landuse` verb with `--class`. |\n| `water` | base | `class` (ocean, lake, river, stream, ...). Use the `water` verb with `--class`. |\n\nRun `botmap --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where 'height>100'\n--where \"class in [motorway,primary,trunk]\"\n```\n\n**Always single-quote any `--where` expression containing `<` or `>`.**\nUnquoted, the shell treats `>` as a redirection: `--where height>150` writes a\nfile named `150` and passes only `height` to the CLI (which then errors with\n\"has no operator\").\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country). For\n non-English cities, the local-script form is often the canonical name\n (e.g. `\u6771\u4eac\u90fd` for Tokyo). For neighborhoods that don't resolve at all\n (many US neighborhoods like SoHo, Greenwich Village, Chelsea are not in\n the divisions data), fall back to the parent locality or use `--bbox`.\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n- **Quote `--where` filters with `<` or `>`.** Always single-quote them so the\n shell does not treat them as redirection (which writes a file named after the\n number and truncates the filter to just the key): `--where 'height>150'`.\n- **Bus stops and transit points are `place` features.** Use\n `places --category bus_stop` (also bus_station, train_station) \u2014 not\n `download -t infrastructure`.\n- **`roads` covers bikes and footpaths too.** It returns every transportation\n segment. Use `roads --class cycleway` (or footway/path) instead of\n `download -t segment --where class=cycleway`.\n- **Prefer the convenience verbs over `download -t TYPE`.** `places`, `roads`,\n `buildings`, `addresses`, `water`, and `landuse` all wrap `download` with\n friendlier flags (`--class`, `--category`) and the same output.\n- **Get boundaries with `where \u2026 --geometry`, not `download -t division_area`.**\n It emits the division polygon as a GeoJSON Feature for clipping or joins.\n", + "botmap/examples/geopandas_example.ipynb": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from botmap import core\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"vscode\": {\n \"languageId\": \"plaintext\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"# Cambridge Kendall Square\\n\",\n \"bbox = (-71.0886055604, 42.3606368124, -71.0766325984, 42.3606368124)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"gdf = core.geodataframe(\\\"segment\\\", bbox=bbox)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"
\\n\",\n \"\\n\",\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
idgeometrybboxversionsourcessubtypeclassnamesconnector_idsroutesaccess_restrictionslevel_rulesprohibited_transitionsroad_surfaceroad_flagsspeed_limitswidth_rules
00852a3067fffffff0469ef7c3fc96601LINESTRING (-71.11551 42.37213, -71.11529 42.3...{'xmin': -71.11550903320312, 'xmax': -71.05274...0[{'property': '', 'dataset': 'OpenStreetMap', ...railNone{'primary': 'Red Line', 'common': None, 'rules...[08f2a3067184655b044bf7748f3e3876, 08f2a306718...NoneNoneNoneNoneNoneNoneNoneNone
10862a30667ffffff0479fdc40c5e8067LINESTRING (-71.10204 42.36441, -71.10201 42.3...{'xmin': -71.10204315185547, 'xmax': -71.08793...0NoneroadcyclewayNone[08f2a30662625bad045efa82cdf75d93, 08f2a306627...None[{'access_type': 'denied', 'when': {'during': ...[{'value': 1, 'between': [0.48834895, 0.496672...None[{'value': 'paved', 'between': [0.0, 0.7918249...[{'values': ['is_bridge'], 'between': [0.48834...NoneNone
20892a3066237ffff047bfa92b25f2bfcLINESTRING (-71.0888 42.36072, -71.08872 42.36...{'xmin': -71.08880615234375, 'xmax': -71.08824...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662343963044dfe87ba195288, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
30892a3066237ffff047eff9c52bc5736LINESTRING (-71.08855 42.3608, -71.08848 42.36...{'xmin': -71.08855438232422, 'xmax': -71.08799...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadfootwayNone[08f2a30662341d8c0450ea91ce3396bc, 08f2a306623...None[{'access_type': 'allowed', 'when': {'during':...NoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
40892a3066237ffff0442faa7187bc82cLINESTRING (-71.08773 42.35998, -71.08775 42.3...{'xmin': -71.08827209472656, 'xmax': -71.08773...0[{'property': '', 'dataset': 'OpenStreetMap', ...roadsidewalkNone[08f2a3066234d99d0470feb178e8c55e, 08f2a306623...NoneNoneNoneNone[{'value': 'paved', 'between': None}]NoneNoneNone
\\n\",\n \"
\"\n ],\n \"text/plain\": [\n \" id \\\\\\n\",\n \"0 0852a3067fffffff0469ef7c3fc96601 \\n\",\n \"1 0862a30667ffffff0479fdc40c5e8067 \\n\",\n \"2 0892a3066237ffff047bfa92b25f2bfc \\n\",\n \"3 0892a3066237ffff047eff9c52bc5736 \\n\",\n \"4 0892a3066237ffff0442faa7187bc82c \\n\",\n \"\\n\",\n \" geometry \\\\\\n\",\n \"0 LINESTRING (-71.11551 42.37213, -71.11529 42.3... \\n\",\n \"1 LINESTRING (-71.10204 42.36441, -71.10201 42.3... \\n\",\n \"2 LINESTRING (-71.0888 42.36072, -71.08872 42.36... \\n\",\n \"3 LINESTRING (-71.08855 42.3608, -71.08848 42.36... \\n\",\n \"4 LINESTRING (-71.08773 42.35998, -71.08775 42.3... \\n\",\n \"\\n\",\n \" bbox version \\\\\\n\",\n \"0 {'xmin': -71.11550903320312, 'xmax': -71.05274... 0 \\n\",\n \"1 {'xmin': -71.10204315185547, 'xmax': -71.08793... 0 \\n\",\n \"2 {'xmin': -71.08880615234375, 'xmax': -71.08824... 0 \\n\",\n \"3 {'xmin': -71.08855438232422, 'xmax': -71.08799... 0 \\n\",\n \"4 {'xmin': -71.08827209472656, 'xmax': -71.08773... 0 \\n\",\n \"\\n\",\n \" sources subtype class \\\\\\n\",\n \"0 [{'property': '', 'dataset': 'OpenStreetMap', ... rail None \\n\",\n \"1 None road cycleway \\n\",\n \"2 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"3 [{'property': '', 'dataset': 'OpenStreetMap', ... road footway \\n\",\n \"4 [{'property': '', 'dataset': 'OpenStreetMap', ... road sidewalk \\n\",\n \"\\n\",\n \" names \\\\\\n\",\n \"0 {'primary': 'Red Line', 'common': None, 'rules... \\n\",\n \"1 None \\n\",\n \"2 None \\n\",\n \"3 None \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" connector_ids routes \\\\\\n\",\n \"0 [08f2a3067184655b044bf7748f3e3876, 08f2a306718... None \\n\",\n \"1 [08f2a30662625bad045efa82cdf75d93, 08f2a306627... None \\n\",\n \"2 [08f2a30662343963044dfe87ba195288, 08f2a306623... None \\n\",\n \"3 [08f2a30662341d8c0450ea91ce3396bc, 08f2a306623... None \\n\",\n \"4 [08f2a3066234d99d0470feb178e8c55e, 08f2a306623... None \\n\",\n \"\\n\",\n \" access_restrictions \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'access_type': 'denied', 'when': {'during': ... \\n\",\n \"2 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"3 [{'access_type': 'allowed', 'when': {'during':... \\n\",\n \"4 None \\n\",\n \"\\n\",\n \" level_rules prohibited_transitions \\\\\\n\",\n \"0 None None \\n\",\n \"1 [{'value': 1, 'between': [0.48834895, 0.496672... None \\n\",\n \"2 None None \\n\",\n \"3 None None \\n\",\n \"4 None None \\n\",\n \"\\n\",\n \" road_surface \\\\\\n\",\n \"0 None \\n\",\n \"1 [{'value': 'paved', 'between': [0.0, 0.7918249... \\n\",\n \"2 [{'value': 'paved', 'between': None}] \\n\",\n \"3 [{'value': 'paved', 'between': None}] \\n\",\n \"4 [{'value': 'paved', 'between': None}] \\n\",\n \"\\n\",\n \" road_flags speed_limits width_rules \\n\",\n \"0 None None None \\n\",\n \"1 [{'values': ['is_bridge'], 'between': [0.48834... None None \\n\",\n \"2 None None None \\n\",\n \"3 None None None \\n\",\n \"4 None None None \"\n ]\n },\n \"execution_count\": 4,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"gdf.head()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.12.4\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n", + "botmap/filters.py": "\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n # User-facing ops from --where: =, !=, <, <=, >, >=, in\n # Internal ops synthesized by subcommands (not parsed from --where):\n # ~ : case-insensitive substring match (used by `addresses --street`)\n op: str\n value: Any # str | int | float | bool | list\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n if self.op == \"~\":\n return pc.match_substring(field_ref, self.value, ignore_case=True)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for i, part in enumerate(parts[1:], start=1):\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:i])} is not a struct\"\n )\n child_names = [current_type.field(j).name for j in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(\n f\"Filter {expr!r} has no operator. Use K OP V, e.g. \"\n f\"--where 'height>150'. If you typed an unquoted > or <, your \"\n f\"shell redirected it to a file \u2014 wrap the whole expression in \"\n f\"single quotes.\"\n )\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n", + "botmap/geocoding.py": "\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: Optional[int]\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\n# ISO-3166-1 alpha-3 \u2192 alpha-2 for the most common country names users type.\n# Overture stores country as alpha-2 (\"US\", \"GB\"...), so a qualifier like\n# \"USA\" or \"United States\" must be normalized before matching.\n_COUNTRY_ALIASES = {\n \"USA\": \"US\", \"UNITED STATES\": \"US\", \"U.S.\": \"US\", \"U.S.A.\": \"US\", \"AMERICA\": \"US\",\n \"UK\": \"GB\", \"GBR\": \"GB\", \"BRITAIN\": \"GB\", \"GREAT BRITAIN\": \"GB\",\n \"UNITED KINGDOM\": \"GB\", \"ENGLAND\": \"GB\",\n \"CAN\": \"CA\", \"CANADA\": \"CA\",\n \"MEX\": \"MX\", \"MEXICO\": \"MX\",\n \"DEU\": \"DE\", \"GERMANY\": \"DE\",\n \"FRA\": \"FR\", \"FRANCE\": \"FR\",\n \"ITA\": \"IT\", \"ITALY\": \"IT\",\n \"ESP\": \"ES\", \"SPAIN\": \"ES\",\n \"PRT\": \"PT\", \"PORTUGAL\": \"PT\",\n \"NLD\": \"NL\", \"NETHERLANDS\": \"NL\", \"HOLLAND\": \"NL\",\n \"BEL\": \"BE\", \"BELGIUM\": \"BE\",\n \"CHE\": \"CH\", \"SWITZERLAND\": \"CH\",\n \"AUT\": \"AT\", \"AUSTRIA\": \"AT\",\n \"POL\": \"PL\", \"POLAND\": \"PL\",\n \"SWE\": \"SE\", \"SWEDEN\": \"SE\",\n \"NOR\": \"NO\", \"NORWAY\": \"NO\",\n \"DNK\": \"DK\", \"DENMARK\": \"DK\",\n \"FIN\": \"FI\", \"FINLAND\": \"FI\",\n \"IRL\": \"IE\", \"IRELAND\": \"IE\",\n \"ISL\": \"IS\", \"ICELAND\": \"IS\",\n \"RUS\": \"RU\", \"RUSSIA\": \"RU\",\n \"CHN\": \"CN\", \"CHINA\": \"CN\",\n \"JPN\": \"JP\", \"JAPAN\": \"JP\",\n \"KOR\": \"KR\", \"SOUTH KOREA\": \"KR\", \"KOREA\": \"KR\",\n \"IND\": \"IN\", \"INDIA\": \"IN\",\n \"AUS\": \"AU\", \"AUSTRALIA\": \"AU\",\n \"NZL\": \"NZ\", \"NEW ZEALAND\": \"NZ\",\n \"BRA\": \"BR\", \"BRAZIL\": \"BR\",\n \"ARG\": \"AR\", \"ARGENTINA\": \"AR\",\n \"CHL\": \"CL\", \"CHILE\": \"CL\",\n \"COL\": \"CO\", \"COLOMBIA\": \"CO\",\n \"ZAF\": \"ZA\", \"SOUTH AFRICA\": \"ZA\",\n \"EGY\": \"EG\", \"EGYPT\": \"EG\",\n \"TUR\": \"TR\", \"TURKEY\": \"TR\", \"T\u00dcRKIYE\": \"TR\",\n \"ISR\": \"IL\", \"ISRAEL\": \"IL\",\n \"ARE\": \"AE\", \"UAE\": \"AE\", \"EMIRATES\": \"AE\",\n \"SAU\": \"SA\", \"SAUDI ARABIA\": \"SA\",\n \"THA\": \"TH\", \"THAILAND\": \"TH\",\n \"VNM\": \"VN\", \"VIETNAM\": \"VN\",\n \"IDN\": \"ID\", \"INDONESIA\": \"ID\",\n \"PHL\": \"PH\", \"PHILIPPINES\": \"PH\",\n \"MYS\": \"MY\", \"MALAYSIA\": \"MY\",\n \"SGP\": \"SG\", \"SINGAPORE\": \"SG\",\n}\n\n\n# Full US state/territory names \u2192 USPS code. A qualifier like \"New York\" is\n# normalized to \"NY\" so the region suffix match (\"-NY\" against \"US-NY\") fires,\n# just like the short forms \"NY\"/\"US-NY\" already do.\n_US_STATE_ALIASES = {\n \"ALABAMA\": \"AL\", \"ALASKA\": \"AK\", \"ARIZONA\": \"AZ\", \"ARKANSAS\": \"AR\",\n \"CALIFORNIA\": \"CA\", \"COLORADO\": \"CO\", \"CONNECTICUT\": \"CT\", \"DELAWARE\": \"DE\",\n \"FLORIDA\": \"FL\", \"GEORGIA\": \"GA\", \"HAWAII\": \"HI\", \"IDAHO\": \"ID\",\n \"ILLINOIS\": \"IL\", \"INDIANA\": \"IN\", \"IOWA\": \"IA\", \"KANSAS\": \"KS\",\n \"KENTUCKY\": \"KY\", \"LOUISIANA\": \"LA\", \"MAINE\": \"ME\", \"MARYLAND\": \"MD\",\n \"MASSACHUSETTS\": \"MA\", \"MICHIGAN\": \"MI\", \"MINNESOTA\": \"MN\",\n \"MISSISSIPPI\": \"MS\", \"MISSOURI\": \"MO\", \"MONTANA\": \"MT\", \"NEBRASKA\": \"NE\",\n \"NEVADA\": \"NV\", \"NEW HAMPSHIRE\": \"NH\", \"NEW JERSEY\": \"NJ\",\n \"NEW MEXICO\": \"NM\", \"NEW YORK\": \"NY\", \"NORTH CAROLINA\": \"NC\",\n \"NORTH DAKOTA\": \"ND\", \"OHIO\": \"OH\", \"OKLAHOMA\": \"OK\", \"OREGON\": \"OR\",\n \"PENNSYLVANIA\": \"PA\", \"RHODE ISLAND\": \"RI\", \"SOUTH CAROLINA\": \"SC\",\n \"SOUTH DAKOTA\": \"SD\", \"TENNESSEE\": \"TN\", \"TEXAS\": \"TX\", \"UTAH\": \"UT\",\n \"VERMONT\": \"VT\", \"VIRGINIA\": \"VA\", \"WASHINGTON\": \"WA\",\n \"WEST VIRGINIA\": \"WV\", \"WISCONSIN\": \"WI\", \"WYOMING\": \"WY\",\n \"DISTRICT OF COLUMBIA\": \"DC\", \"WASHINGTON DC\": \"DC\", \"WASHINGTON, D.C.\": \"DC\",\n \"PUERTO RICO\": \"PR\", \"GUAM\": \"GU\", \"AMERICAN SAMOA\": \"AS\",\n \"US VIRGIN ISLANDS\": \"VI\", \"U.S. VIRGIN ISLANDS\": \"VI\",\n \"NORTHERN MARIANA ISLANDS\": \"MP\",\n}\n\n\ndef _normalize_qualifier(q: str) -> str:\n \"\"\"Apply common aliases so 'USA'/'United States' \u2192 'US' and full US\n state names like 'New York' \u2192 'NY' (matched as the '-NY' region suffix).\n\n Country aliases take precedence over state names where they would collide.\n \"\"\"\n normalized = q.strip().upper()\n if normalized in _COUNTRY_ALIASES:\n return _COUNTRY_ALIASES[normalized]\n if normalized in _US_STATE_ALIASES:\n return _US_STATE_ALIASES[normalized]\n return normalized\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\n_index_cache: dict[str, \"pq.Table\"] = {}\n\n\ndef _load_index_table():\n release = _latest_release()\n if release not in _index_cache:\n path = ensure_index(release)\n _index_cache[release] = pq.read_table(path)\n return _index_cache[release]\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: divisions with a known\n population first, then by descending population, then by descending\n admin_level (innermost area) as a tiebreaker.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary only.\n # name_common was dropped from the index due to PyArrow join constraints\n # on map non-key fields (see commit 2041f45).\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n name_match = pc.equal(primary, name_lower)\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars), full region\n # code (e.g. \"US-MA\"), or the suffix after the hyphen (e.g. \"MA\" -> \"US-MA\").\n # Common country aliases (USA, UK, France, ...) are normalized to alpha-2.\n for q in qualifiers:\n normalized = _normalize_qualifier(q)\n country_match = pc.equal(filtered.column(\"country\"), normalized)\n region_match = pc.equal(filtered.column(\"region\"), normalized)\n region_suffix_match = pc.ends_with(filtered.column(\"region\"), f\"-{normalized}\")\n filtered = filtered.filter(\n pc.or_(pc.or_(country_match, region_match), region_suffix_match)\n )\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: prefer rows with a known population (real places people search\n # for), then larger population, then innermost admin_level as a final\n # tiebreaker. admin_level is mostly null in this index, so making it\n # the primary key (the old behavior) caused tiny administrative areas\n # to outrank major cities \u2014 e.g., the Saskatchewan \"Alameda\" county\n # outranked Alameda, CA. Population is the more reliable signal.\n filtered = filtered.append_column(\n \"_has_pop\", pc.is_valid(filtered.column(\"population\"))\n )\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[\n (\"_has_pop\", \"descending\"),\n (\"population\", \"descending\"),\n (\"admin_level\", \"descending\"),\n ],\n )\n filtered = filtered.take(sort_indices).drop_columns([\"_has_pop\"])\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n", + "botmap/intents.py": "\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n", + "botmap/introspection.py": "\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nimport pyarrow as pa\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n", + "botmap/models.py": "\"\"\"Data models for the Overture toolkit.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom enum import Enum\n\n# Compatibility shim for Python 3.10 (StrEnum was added in 3.11)\ntry:\n from enum import StrEnum\nexcept ImportError:\n\n class StrEnum(str, Enum): # type: ignore[no-redef]\n \"\"\"String enumeration for Python < 3.11 compatibility.\"\"\"\n\n def __str__(self) -> str:\n return str(self.value)\n\n @staticmethod\n def _generate_next_value_(name, start, count, last_values):\n return name.lower()\n\n\nclass Backend(StrEnum):\n \"\"\"Storage backend for local Overture data.\"\"\"\n\n geojson = \"geojson\"\n geojsonseq = \"geojsonseq\"\n geoparquet = \"geoparquet\"\n\n\n@dataclass\nclass BBox:\n \"\"\"Axis-aligned bounding box (WGS84 lon/lat).\"\"\"\n\n xmin: float\n ymin: float\n xmax: float\n ymax: float\n\n def as_tuple(self) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) tuple.\"\"\"\n return (self.xmin, self.ymin, self.xmax, self.ymax)\n\n def as_dict(self) -> dict[str, float]:\n \"\"\"Return bbox as a dictionary.\"\"\"\n return {\n \"xmin\": self.xmin,\n \"ymin\": self.ymin,\n \"xmax\": self.xmax,\n \"ymax\": self.ymax,\n }\n\n @classmethod\n def from_dict(cls, data: dict[str, float]) -> BBox:\n \"\"\"Create BBox from a dictionary.\"\"\"\n return cls(\n xmin=data[\"xmin\"],\n ymin=data[\"ymin\"],\n xmax=data[\"xmax\"],\n ymax=data[\"ymax\"],\n )\n\n\n@dataclass\nclass PipelineState:\n \"\"\"Persistent state tracking for a download pipeline.\"\"\"\n\n last_release: str\n last_run: str # ISO 8601 datetime string\n theme: str\n type: str\n bbox: BBox | None\n backend: Backend\n output: str # file path\n\n def as_dict(self) -> dict:\n \"\"\"Convert state to a dictionary for JSON serialization.\"\"\"\n return {\n \"last_release\": self.last_release,\n \"last_run\": self.last_run,\n \"theme\": self.theme,\n \"type\": self.type,\n \"bbox\": self.bbox.as_dict() if self.bbox is not None else None,\n \"backend\": str(self.backend),\n \"output\": self.output,\n }\n\n @classmethod\n def from_dict(cls, data: dict) -> PipelineState:\n \"\"\"Create PipelineState from a dictionary.\"\"\"\n bbox_data = data.get(\"bbox\")\n return cls(\n last_release=data[\"last_release\"],\n last_run=data[\"last_run\"],\n theme=data[\"theme\"],\n type=data[\"type\"],\n bbox=BBox.from_dict(bbox_data) if bbox_data is not None else None,\n backend=Backend(data[\"backend\"]),\n output=data[\"output\"],\n )\n", + "botmap/releases.py": "\"\"\"Functions for listing and querying Overture Maps releases.\"\"\"\n\nfrom __future__ import annotations\n\nfrom .core import get_available_releases\n\n\ndef list_releases() -> list[str]:\n \"\"\"List all available Overture Maps release IDs, newest first.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Sorted list of release IDs (e.g. [\"2024-11-13.0\", \"2024-10-23.0\", ...]).\n \"\"\"\n releases, _ = get_available_releases()\n # Sort descending so newest is first\n return sorted(releases, reverse=True)\n\n\ndef get_latest_release() -> str:\n \"\"\"Return the ID of the most recent Overture Maps release.\n\n Uses the STAC catalog for efficient retrieval.\n\n Returns:\n Latest release ID string.\n\n Raises:\n RuntimeError: If no releases are found.\n \"\"\"\n releases, latest = get_available_releases()\n if not latest and not releases:\n raise RuntimeError(\"No Overture Maps releases found.\")\n return latest or releases[0]\n\n\ndef release_exists(release: str) -> bool:\n \"\"\"Check whether a given release ID exists.\n\n Uses the STAC catalog.\n\n Args:\n release: Release ID to check (e.g. \"2024-11-13.0\").\n\n Returns:\n True if the release exists, False otherwise.\n \"\"\"\n try:\n releases, _ = get_available_releases()\n return release in releases\n except Exception:\n return False\n\n\ndef get_next_release(current_release: str) -> str | None:\n \"\"\"Get the release that comes immediately after the given release.\n\n Args:\n current_release: A release ID (e.g. \"2025-12-17.0\").\n\n Returns:\n The next release ID, or None if current_release is the latest.\n \"\"\"\n releases = list_releases() # Returns newest first\n try:\n current_idx = releases.index(current_release)\n # Since list is newest first, next release is at index - 1\n if current_idx > 0:\n return releases[current_idx - 1]\n return None # Already at latest\n except ValueError:\n # Current release not found\n return None\n", + "botmap/skill_installer.py": "\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"botmap\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"botmap\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the botmap section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n", + "botmap/state.py": "\"\"\"Pipeline state management for tracking downloads and updates.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom .models import PipelineState\n\n\ndef get_state_path(output_path: str) -> Path:\n \"\"\"Get the state file path for a given output file.\n\n Args:\n output_path: Path to the output file.\n\n Returns:\n Path to the state file (output_path + \".state\").\n \"\"\"\n return Path(f\"{output_path}.state\")\n\n\ndef load_state(state_path: Path | str) -> Optional[PipelineState]:\n \"\"\"Load pipeline state from a JSON file.\n\n Args:\n state_path: Path to the state file.\n\n Returns:\n PipelineState object if file exists, None otherwise.\n \"\"\"\n state_path = Path(state_path)\n if not state_path.exists():\n return None\n\n try:\n with open(state_path, \"r\") as f:\n data = json.load(f)\n return PipelineState.from_dict(data)\n except (json.JSONDecodeError, KeyError, FileNotFoundError):\n return None\n\n\ndef save_state(state: PipelineState, state_path: Path | str) -> None:\n \"\"\"Save pipeline state to a JSON file.\n\n Args:\n state: PipelineState object to save.\n state_path: Path to the state file.\n \"\"\"\n state_path = Path(state_path)\n # Create parent directory if it doesn't exist\n state_path.parent.mkdir(parents=True, exist_ok=True)\n\n with open(state_path, \"w\") as f:\n json.dump(state.as_dict(), f, indent=2)\n", + "botmap/writers.py": "\"\"\"\nWriters and data pipeline for Overture Maps output formats.\n\nImplements the context-manager writer protocol and the copy() pipeline\nthat streams RecordBatches from a reader to a writer.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\nimport orjson\nimport pyarrow.parquet as pq\nimport shapely\nfrom tqdm import tqdm\n\n\ndef get_writer(output_format, path, schema):\n if output_format == \"geojson\":\n return GeoJSONWriter(path)\n elif output_format == \"geojsonseq\":\n return GeoJSONSeqWriter(path)\n elif output_format == \"geoparquet\":\n # Update the geoparquet metadata to remove the file-level bbox which\n # will no longer apply to this file. Since we cannot write the field at\n # the end, just remove it as it's optional. Let the per-row bounding\n # boxes do all the work.\n metadata = schema.metadata\n geo = json.loads(metadata[b\"geo\"])\n geo_columns = geo[\"columns\"]\n if len(geo_columns) > 1:\n raise IOError(\"Expected single geom column but encountered multiple.\")\n for geom_col_vals in geo_columns.values():\n # geom level extents \"bbox\" is optional - remove if present\n # since extracted data will have different extents\n if \"bbox\" in geom_col_vals:\n geom_col_vals.pop(\"bbox\")\n # add \"covering\" if there is a row level \"bbox\" column\n # this facilitates spatial filters e.g. geopandas read_parquet\n if \"bbox\" in schema.names:\n geom_col_vals[\"covering\"] = {\n \"bbox\": {\n \"xmin\": [\"bbox\", \"xmin\"],\n \"ymin\": [\"bbox\", \"ymin\"],\n \"xmax\": [\"bbox\", \"xmax\"],\n \"ymax\": [\"bbox\", \"ymax\"],\n }\n }\n metadata[b\"geo\"] = json.dumps(geo).encode(\"utf-8\")\n schema = schema.with_metadata(metadata)\n return pq.ParquetWriter(path, schema)\n else:\n supported = (\"geojson\", \"geojsonseq\", \"geoparquet\")\n raise ValueError(\n f\"Unknown output format {output_format!r}. \"\n f\"Supported formats: {', '.join(supported)}\"\n )\n\n\ndef copy(reader, writer):\n # disable=None auto-suppresses tqdm when stderr is not a TTY (piped,\n # captured to a log, redirected via 2>&1). Prevents progress chatter\n # from polluting downstream parsers and stops \\r-based redraw spam\n # when stderr is a regular file.\n rows_written = 0\n with tqdm(\n total=None, unit=\" rows\", desc=\"Downloading\",\n file=sys.stderr, colour=\"blue\", disable=None,\n ) as bar:\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows > 0:\n writer.write_batch(batch)\n bar.update(batch.num_rows)\n rows_written += batch.num_rows\n return rows_written\n\n\nclass BaseGeoJSONWriter:\n \"\"\"\n A base feature writer that manages either a file handle\n or output stream. Subclasses should implement write_feature()\n and finalize() if needed.\n \"\"\"\n\n def __init__(self, where):\n self.file_handle = None\n if isinstance(where, str):\n self.file_handle = open(os.path.expanduser(where), \"w\")\n self.writer = self.file_handle\n else:\n self.writer = where\n self.is_open = True\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n self.close()\n\n def close(self):\n if not self.is_open:\n return\n self.finalize()\n if self.file_handle:\n self.file_handle.close()\n self.is_open = False\n\n def write_batch(self, batch):\n if batch.num_rows == 0:\n return\n\n geom_strings = shapely.to_geojson(\n shapely.from_wkb(batch.column(\"geometry\").to_pylist())\n )\n\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n rows = batch.select(prop_cols).to_pylist()\n\n for geom_str, row in zip(geom_strings, rows):\n self.write_feature(geom_str, row)\n\n def write_feature(self, geom_str, props):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.write_feature() must be implemented by subclasses\"\n )\n\n def finalize(self):\n raise NotImplementedError(\n f\"{self.__class__.__name__}.finalize() must be implemented by subclasses\"\n )\n\n\nclass GeoJSONSeqWriter(BaseGeoJSONWriter):\n def finalize(self):\n pass # GeoJSONSeq has no closing footer\n\n def write_feature(self, geom_str, props):\n # GeoJSON Feature identity belongs at top-level \"id\", not under properties.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}\\n'\n )\n\n\nclass GeoJSONWriter(BaseGeoJSONWriter):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._has_written_feature = False\n self.writer.write('{\"type\": \"FeatureCollection\", \"features\": [\\n')\n\n def write_feature(self, geom_str, props):\n # Keep feature id semantics consistent across both GeoJSON output modes.\n feature_id = props.get(\"id\")\n properties = {k: v for k, v in props.items() if k != \"id\" and v is not None}\n props_str = orjson.dumps(properties).decode()\n feature_id_str = (\n f'\"id\":{orjson.dumps(feature_id).decode()},' if feature_id is not None else \"\"\n )\n if self._has_written_feature:\n self.writer.write(\",\\n\")\n self.writer.write(\n f'{{{feature_id_str}\"type\":\"Feature\",\"geometry\":{geom_str},\"properties\":{props_str}}}'\n )\n self._has_written_feature = True\n\n def finalize(self):\n self.writer.write(\"]}\")\n", + "designing_cli_interfaces_for_data_products.md": "# Designing CLI Interfaces for Data Products (in the LLM Era)\n\nA field log from forking [`overturemaps-py`](https://github.com/OvertureMaps/overturemaps-py)\nand reshaping its CLI so an LLM agent can use it without being a GIS expert.\nThe same redesign was friendlier for humans, too \u2014 but agents were the\nforcing function. What follows is what we tried, what we got wrong, and the\ndesign rules we'd carry into the next data-product CLI.\n\n---\n\n## What we started with\n\nThe pre-fork CLI was a thin wrapper over Overture's S3 Parquet:\n\n```bash\noverturemaps download --bbox xmin,ymin,xmax,ymax -t TYPE -f geojson -o out.geojson\n```\n\nThat's the entire surface. It assumes you:\n\n- Know which **type** (`place`, `building`, `segment`, `division_area`, \u2026) holds your answer\n- Have a **bounding box** in WGS84 already on hand\n- Are comfortable post-filtering with `jq` or a notebook\n- Will look at the Overture schema docs in another tab to figure out which\n field names are real\n\nIt's a perfectly fine pipe-builder for someone who already lives in QGIS.\nIt's a brick wall for everyone else \u2014 including LLM agents, which now make\nup a meaningful share of \"everyone else.\"\n\n## The reframe: design for the question, not the data\n\nThe pre-fork CLI is *data-shaped*. Its verbs and flags mirror the storage\nlayout \u2014 types, bounding boxes, columns. To use it you have to translate\nyour question into that shape first.\n\nAgents (and human newcomers) ask *question-shaped* things:\n\n- \"How many coffee shops are in Brooklyn?\"\n- \"Find hospitals in Manhattan\"\n- \"Coffee shops within 1km of this point\"\n- \"What's at 40.7128, -74.0060?\"\n- \"What's the bounding box of Boston?\"\n\nNone of those naturally produce a `--bbox xmin,ymin,xmax,ymax -t place`.\nThey produce a verb (`count`, `find`, `near`), an entity (\"coffee shops\",\n\"hospitals\"), and a place (\"Brooklyn\", \"this point\").\n\nSo the redesign goal became: **expose verbs that read like the question,\nand resolve the data-shaped bits internally.**\n\n## The new surface \u2014 what shipped\n\nA small family of commands, grouped by what they do for the user, not by\nwhat file they read:\n\n**Intent verbs** \u2014 one per common entity type. Each takes either `--in\n\"Place Name\"` or `--bbox \u2026`:\n\n| Command | Question it answers |\n|---|---|\n| `places --in X --category Y` | \"POIs of type Y in place X\" |\n| `buildings --in X --where height>150` | \"Tall buildings in X\" |\n| `roads --in X --class motorway` | \"Highways through X\" |\n| `addresses --in X --street \"Main\"` | \"Main St addresses in X\" |\n\n**Spatial primitives** \u2014 answer location-based questions directly:\n\n| Command | Question it answers |\n|---|---|\n| `at LAT,LON -t TYPE --radius M --where \u2026` | \"What's near this point, filtered\" |\n| `containing LAT,LON` | \"Which admin areas contain this point?\" |\n| `where \"Boston, MA\"` | \"Where is X / what's its bbox?\" |\n\n**Discovery primitives** \u2014 let an agent learn the data without docs:\n\n| Command | Purpose |\n|---|---|\n| `themes` / `types` | Top-level catalog |\n| `schema -t TYPE` | Field list + sample row |\n| `categories -t place --top 200` | Enumerate the place taxonomy |\n| `sample -t TYPE \u2026` | Preview N rows |\n| `count -t TYPE \u2026` | How big is this query? (cheap) |\n| `capabilities` | JSON manifest of every subcommand for self-discovery |\n\n**Friction-removers**:\n\n- A global `--json` flag turns every metadata command into a clean pipe source\n- `where` resolves \"Boston, MA\", \"Boston, US-MA\", \"Boston, USA\", \"Boston,\n United States\" \u2014 qualifier syntax matches how people actually write it\n- `where --all` enumerates every candidate for an ambiguous query\n- Every data command prints a one-line stderr warning when `--in` is\n ambiguous, naming both the picked match and the top alternative\n- `places --category X` (and `--where categories.primary=X`) emits a\n stderr hint with up to 3 near-matches when no rows come back, so the\n agent doesn't have to round-trip through `categories` to find the\n right value\n- A bundled **Skill** (`install-skill`) registers the CLI with Claude Code\n and other agent harnesses so the model loads the right context on the\n right kinds of question\n\nWhat we *removed* (or demoted): nothing \u2014 `download` still exists, because\nsome types (`address`, `division`, `water`, `land_use`) didn't get a\nconvenience verb. But for the four covered types, `download` became the\nescape hatch rather than the front door.\n\n## The big design moves, condensed\n\n1. **Verbs over types.** `places` instead of `download -t place`. The\n command name carries half the user's intent.\n2. **Lookups, not coordinates.** `--in \"Brooklyn\"` instead of asking the\n user (or agent) to hand-build a bbox. We index Overture's divisions\n layer locally and resolve names \u2192 bboxes on the fly.\n3. **Shortcuts for the long tail of common asks.** `--category coffee_shop`\n beats `--where categories.primary=coffee_shop`. Eighty percent of\n questions hit a tiny vocabulary; pay for that.\n4. **Discovery is a first-class command, not docs.** `schema`,\n `categories`, `capabilities` mean an agent never has to leave the CLI\n to figure out the next argument.\n5. **`--json` everywhere.** Every metadata command emits a machine-readable\n variant. Data commands emit structured GeoJSON / GeoParquet. No\n human-prose stdout to parse.\n6. **A Skill alongside the binary.** The CLI ships with a markdown brief\n that primes any agent harness with the verbs, the patterns, and the\n anti-patterns. Documentation that the model actually reads.\n\n---\n\n## Testing through usage, not assertion\n\nUnit tests prove the parser doesn't crash. They don't prove an LLM can\nanswer \"5 coffee shops near my house in Alameda\" without falling off a\ncliff. The honest way to test an agent-facing CLI is to *put an agent in\nfront of it* and watch.\n\nWhat we did:\n\n- Wrote real questions in fresh conversations. No leading prompts, no\n babying the model into the \"right\" tool.\n- Examples used:\n - *\"Find 5 coffee shops near 1234 Main Street, Alameda CA, with a table of name, address, lat/lng, distance.\"*\n - *\"List all ferry terminals in Alameda, California.\"*\n - *\"Find coffee shops near the Target in Alameda and present them as a table sorted by distance.\"*\n- Each ran in a temporary directory with no pre-loaded context except the\n installed CLI and its Skill.\n- We let the conversation finish, then went back and read the trace.\n\nTrace reading turned out to be the highest-leverage debugging tool we have.\nA passing test tells you the code works. A trace tells you whether the\n*interface* works \u2014 whether the verb name matched what the model reached\nfor, whether the error message taught it anything, whether it gave up and\nfell back to a worse path.\n\nWe did this against **9 traces** across multiple project directories on the\nsame machine, including dry-run sessions from skill development and live\nsessions from real ad-hoc questions.\n\n## What the traces revealed\n\nGrouping the stumbles by theme, with the actual commands the agent tried:\n\n### A. The \"fall back to `download`\" failure mode\n\nThe most common pattern. Even with `places`, `buildings`, `roads`, and `at`\nall present, agents repeatedly ended up at `download --bbox` for any query\nthat combined a point or area with a filter:\n\n```bash\n# What the agent eventually ran:\noverturemaps download --bbox=-122.295,37.778,-122.265,37.800 -t place \\\n --where \"categories.primary=coffee_shop\"\n```\n\n\u2026to answer \"coffee shops within 1.5km of this point.\" The right primitive\nwas `at LAT,LON -t place --radius 1500 --where \u2026` \u2014 but it didn't exist at\nthe time of that trace. Once we added `--radius` and `--where` to `at`, the\nfallback should have stopped. It didn't, fully \u2014 because the *Skill* still\nled with `--in`-style recipes, so the agent didn't know the new shape existed.\n\n**Lesson:** New flags \u2260 new behavior. The Skill is the model's de-facto\ndocumentation; it has to be updated in lockstep with the CLI surface,\notherwise the new affordance is invisible.\n\n### B. Place-name ambiguity\n\n`--in \"Alameda, CA\"` resolved to **Alameda County, Saskatchewan, Canada**\ninstead of Alameda, California. The agent didn't notice \u2014 it queried for\nTarget stores in the (wrong) place, got zero results, assumed the query\nwas the problem rather than the place, and went hunting in `--where` land.\n\n```bash\noverturemaps --json where \"Alameda, CA\"\n# {\"name\":\"Alameda County\",\"subtype\":\"region\",\"country\":\"CA\",...}\n```\n\nThe agent eventually discovered `\"Alameda, US-CA\"` works, but only after\nseveral wrong-side-of-the-border queries.\n\n**Lesson:** *Silent* resolution is the worst kind. If a single string\nmatches multiple plausible places, the CLI has to either (a) refuse and\nask, or (b) loudly print the chosen interpretation to stderr so the agent\ncan sanity-check. Default-and-pray gets you Saskatchewan.\n\n**Fixes shipped (three layers):**\n\n1. *Country alias normalization.* Qualifiers like `USA`, `United States`,\n alpha-3 codes, etc. are mapped to alpha-2 (`US`) before matching, so\n the common human forms resolve consistently.\n2. *Smarter default ranking.* The old sort was `(admin_level desc,\n population desc)`. In this index `admin_level` is mostly null while\n `population` is set for places people actually search for. A\n tiny-county outranking a major city was a direct consequence of\n that. New ranking: `(has_population desc, population desc,\n admin_level desc)` \u2014 real places with measured inhabitants outrank\n thinly-documented administrative areas.\n3. *Ambiguity warnings on stderr.* Every data command now prints a\n one-line warning when `--in` resolves to multiple candidates,\n naming the picked match and the top alternative and pointing at\n `where --all` for full inspection. Combined with `where --all`\n (a new flag that lists every candidate), agents can disambiguate\n without leaving the CLI.\n\nThe warning fires even after the smarter ranking \u2014 because correct\ndefault \u2260 unambiguous query. The warning is the audit trail that\nturns a silent judgment call into a visible one.\n\n### C. Address lookup unusable in practice\n\nThe trace that prompted this entire effort:\n\n```bash\n# Five attempts, all returning 0 rows:\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'number=\"1208\"' --where 'street=\"Fountain Street\"'\noverturemaps download -t address --in \"Alameda, US-CA\" --where \"number=1208\" --where \"street=Fountain Street\"\noverturemaps download -t address --in \"Alameda, US-CA\" --where 'street=\"FOUNTAIN ST\"' --where 'number=\"1208\"'\n# Agent gives up, hand-sources coordinates from external geocoding.\n```\n\nThe stored value was `\"FOUNTAIN ST\"` (uppercase, abbreviated). Three things\nconspired against the agent:\n\n1. The street field is sparsely covered, so retries felt like noise\n2. The canonical form (`\"FOUNTAIN ST\"`) was undiscoverable without sampling\n3. `--where street=\"\u2026\"` is exact-match only\n\n**Lesson:** When a field's *storage form* doesn't match any sane *input\nform*, the user (human or agent) cannot fix it with retries \u2014 they need a\nnew primitive. We added `addresses --street Fountain` (case-insensitive\nsubstring) and the query that previously took six attempts now returns the\nright row on the first try.\n\n### D. Category names had to be guessed\n\n```bash\noverturemaps --json count -t place --in \"Alameda, US-CA\" --where categories.primary=ferry_terminal\n# 0 rows\n# Agent then runs:\noverturemaps --json categories -t place --in \"Alameda, US-CA\" --top 200 | grep -i ferry\n# Discovers ferry_terminal, ferry_service, ferry_boat_company all exist\noverturemaps sample -t place --in \"Alameda, US-CA\" --where \"categories.primary in [ferry_terminal,ferry_service,ferry,ferries]\" -n 10\n```\n\nThe discovery loop *worked* \u2014 `categories` is exactly the right command\nfor this \u2014 but the agent had to *know to reach for it*. A zero-result\nresponse from a `categories.primary=X` filter is the perfect place to\nsuggest *\"try `overturemaps categories -t place --search ferry`\"*.\n\n**Lesson:** Zero-result responses are an unused communication channel.\nEmpty stdout is the most expensive failure mode because it tells the model\nnothing about what to do next.\n\n**Fix shipped.** `places` now detects the failure case (zero rows + a\n`categories.primary` filter), runs a one-shot scan of the bbox to enumerate\nthe *actual* category vocabulary present, ranks candidates against the\nuser's input, and emits up to three near-matches on stderr:\n\n```\n[overturemaps] 0 rows. No place has categories.primary='ferry_terminal' in\nthis bbox. Did you mean: ferry_boat_company? \u2026\n```\n\nRanking is token-overlap + character-similarity + substring containment \u2014\na 4-component score that handles three classes of mistake together:\nsemantic misses (`ferry_terminal` \u2192 `ferry_boat_company`), single-character\ntypos (`coffe_shop` \u2192 `coffee_shop`), and short prefixes (`cafe` \u2192\n`cafeteria`). A complete-nonsense input falls through to a \"not present\"\nfallback that points at `categories`. The scan only runs on the failure\npath, so successful queries pay nothing.\n\n### E. Progress bar polluting stdout\n\n```python\n# What the agent literally wrote to defend against our CLI:\ndata = json.loads(sys.stdin.read().split('Downloading')[0])\n```\n\nThe download progress bar was emitted to stdout, *inline with the JSON\nstream*. Every pipe broke. Agents either learned to surgically strip the\nheader, or invented Python workarounds for what should have been\n`overturemaps places --bbox=\u2026 -f geojsonseq | jq ...`.\n\n**Lesson:** stdout is for data, stderr is for human chatter. This is so\nbasic that it's easy to overlook \u2014 but the moment another tool wants to\npipe your output, any non-data byte on stdout becomes a bug.\n\n**Fix shipped.** Investigating revealed the progress bar was *already*\ngoing to stderr; the actual issue was twofold. First, `tqdm` uses `\\r`\nto redraw \u2014 which produces multi-line text dumps when stderr is captured\nto a file. Second, agent invocations frequently merge streams (`2>&1`).\nThe one-line fix was `disable=None` in the `tqdm` constructor, which\nauto-suppresses progress when stderr isn't a TTY. Interactive users\nstill see the bar; pipes, log capture, and `2>&1` get clean data.\n\n### F. Agents silenced stderr aggressively\n\nMost agent runs invoked the CLI as `\u2026 2>/dev/null`. Helpful resolution\nwarnings (when they existed) went to `/dev/null`. The agent saw an empty\nresult and no signal as to why.\n\n**Lesson:** This is a two-sided problem. The CLI should keep stderr\n\"reading-worthy\" (don't spam progress to it), and the Skill should\ninstruct the agent not to silence it. The Skill update added that\nguidance explicitly.\n\n### G. Agents preferred `download` even when verbs existed\n\nOld reflex from the pre-fork CLI: when in doubt, type `download`. Several\ntraces show `overturemaps download -t place --bbox \u2026 --where \u2026` running\nwhen an identical `overturemaps places --bbox \u2026 --where \u2026` would have\nworked. The two are functionally equivalent; the verb form is just nicer.\n\n**Lesson:** Adding new verbs doesn't replace the muscle memory for the old\nones unless you actively retire them. We didn't remove `download` (yet) \u2014\nbut we did demote it in the Skill and explicitly mark *\"don't reach for\n`download` first\"* in the anti-patterns. Behavior should shift.\n\n---\n\n## The improvement loop\n\nEvery fix in this branch came from one of three sources:\n\n1. **A trace where the agent gave up** \u2014 like the address case. A primitive\n was missing.\n2. **A trace where the agent succeeded but ugly** \u2014 like the substring-strip\n defense against the progress bar. The interface was making the agent\n work harder than it should.\n3. **A trace where the agent was wrong but didn't know it** \u2014 like the\n Alameda-Canada case. The error wasn't an error; it was silence.\n\nThe fix shape varied by category:\n\n| Failure source | Fix shape |\n|---|---|\n| Missing primitive | New subcommand or flag (`addresses`, `at --radius`, `at --where`) |\n| Ugly success | Internals change (substring op, progress to stderr) |\n| Silent wrongness | Loud stderr warning + Skill guidance |\n\nThe pattern is consistent: **agents almost never read documentation, but\nthey always read tool output.** So the highest-leverage move is to put the\nguidance in the output stream, not in a separate doc.\n\n## Lessons we'd carry to another data-product CLI\n\nThese are the rules we'd write down before designing the next one.\n\n### 1. Question shape, not data shape\n\nYour verbs should match how someone *asks* about your data, not how the\ndata is laid out on disk. `places --in \"Brooklyn\" --category cafe` reads\nlike the question. `download --bbox \u2026 -t place --where categories.primary=cafe`\nreads like the schema.\n\n### 2. Cheap convenience for the head of the distribution\n\nA handful of questions cover 80% of the requests. Wire shortcuts:\n`--category`, `--class`, `--street`, `--radius`. The general filter\nsyntax (`--where K OP V`) stays for the long tail.\n\n### 3. Resolve, don't require\n\nIf the user can type \"Brooklyn\" and you can resolve it to a bbox, do that.\nThe cost is one local index lookup; the gain is the user never has to\nleave the question's vocabulary.\n\n### 4. Make ambiguity loud\n\nSilent default-resolution kills agent workflows in the most expensive way:\nzero results, no signal, retry storm. If your resolver hit a fork, *say\nso on stderr*. Better yet, refuse and ask.\n\n### 5. Discovery is a command, not a manual\n\n`schema`, `categories`, `capabilities`, `sample` \u2014 every one is a first-class\nverb. An agent that can self-discover the shape of your data is an agent\nthat doesn't escalate to its human.\n\n### 6. stdout for data; stderr for humans\n\nIf a byte that isn't data lands on stdout, somebody's pipe is going to\nbreak. The progress bar argument always loses to the JSON parsing\nargument.\n\n### 7. Don't make the user guess the canonical form\n\nIf your field stores `\"FOUNTAIN ST\"` but users will type `\"Fountain Street\"`,\n`\"fountain st\"`, or `\"FOUNTAIN STREET\"`, the *CLI* should bridge the gap.\nCase-insensitive substring matching turned a six-attempt failure into a\nsingle-shot success.\n\n### 8. Empty results are a teaching opportunity\n\n`0 rows` is the worst response you can give an agent. If you have any\nsignal about *why* \u2014 a near-miss in `categories`, a wrong region in\n`--in` \u2014 emit it. Don't leave the agent to invent an explanation.\n\n### 9. Test by watching the agent, not by writing more asserts\n\nUnit tests will never catch the wrong-shaped verb name. Putting a real\nquestion to a real agent and reading the trace will. Build a habit of\n\"trace review\" the way you'd build a habit of code review.\n\n### 10. Ship a Skill (or whatever your harness calls it)\n\nIf your data product is going to be used by LLM-driven agents in any\nmeaningful percentage of cases, ship the agent-facing brief alongside the\nbinary. Treat the Skill file as production code \u2014 versioned, tested,\nupdated in lockstep with the CLI surface.\n\n---\n\n## What shipped, end-to-end\n\nEvery failure mode the trace synthesis surfaced now has a corresponding\nfix in the CLI, the Skill, or both:\n\n| Failure mode (trace letter) | Status | Fix |\n|---|---|---|\n| A. Reflexive `download` fallback | Shipped | Skill re-ordered to lead with `places --bbox` and `at --where --radius` |\n| B. Place-name ambiguity | Shipped | Country normalization + smarter ranking + stderr warning + `where --all` |\n| C. Address lookup unusable | Shipped | New `addresses` subcommand with case-insensitive substring street matching |\n| D. Category names guessed by trial | Shipped | Zero-result hints with token + similarity + substring scoring |\n| E. Progress bar pollution | Shipped | `tqdm(disable=None)` auto-suppresses on non-TTY stderr |\n| F. Agents silencing stderr | Skill | Anti-pattern added to the Skill; warnings now worth reading |\n| G. Verb-vs-`download` muscle memory | Skill | Anti-patterns demote `download` to the escape hatch |\n\n## What's still open\n\nThese didn't surface in any trace yet but are natural next moves:\n\n- **Generalize zero-result hints beyond `places`.** `roads --class X`,\n `buildings --where class=X`, and `addresses --postcode X` could all\n use the same mechanism. Wait until traces show agents getting stuck\n there before generalizing \u2014 the `places --category` case was the loud\n one and it's resolved.\n- **Structured stderr in JSON mode.** When `--json` is set, warnings\n currently still emit as prose lines on stderr. A JSON envelope\n (`{\"warning\": {...}}`) would let strict pipelines consume them. Low\n priority; agents read the prose just fine.\n- **`download` deprecation for the four covered types.** `places`,\n `buildings`, `roads`, and `addresses` now do everything `download`\n does (plus more) for their respective types. A polite deprecation\n warning when `download -t place|building|segment|address` is invoked\n would close out trace G mechanically rather than depending on the\n Skill to retrain muscle memory.\n- **Multilingual place names.** Overture stores `name_primary` in the\n local script (`\u6771\u4eac\u90fd` for Tokyo). The Skill mentions this but the\n CLI doesn't help \u2014 there's no `name_common` fallback in the index\n (a pre-existing PyArrow constraint). Worth revisiting if it becomes\n a friction point.\n\n## Closing\n\nThe path from \"the CLI exists\" to \"the CLI is actually useful to an agent\"\nruns through traces. There's no shortcut. But every fix you put in front\nof an agent is a fix you no longer have to put in a docs page, and the\nagent will read your fix every time.\n\nThe biggest surprise of this exercise wasn't any single failure mode \u2014\nit was how cheaply the highest-impact fixes shipped once we had the\ntraces in hand. Most were one-line: a `disable=None`, a sort-key swap,\na stderr warning. The expensive part was knowing *which* line. That\nknowledge lives in the traces, not in the documentation, not in the\ntest suite, not in the design doc. Treat trace review like you'd treat\ncode review.\n", + "docs/automated-improvements/progress_summary.md": "# Agent-Usability Eval: Progress Summary\n\nThree eval rounds, each 20 runs (10 questions \u00d7 2 agents), spanning the addition of new verbs, friendlier errors, and doc fixes. Rounds are labeled by the report file that produced the current round's proposals.\n\n---\n\n## Fleet-wide aggregate trends\n\n| Metric | Report 01 | Report 02 | Report 03 | Change (01\u219203) |\n|---|---|---|---|---|\n| Download rate (avg across questions) | 35.0% | 15.0% | 15.0% | **\u221220 pp** |\n| Unnecessary download rate | 15.0% | 15.0% | 15.0% | flat |\n| Error rate | 25.0% | 20.0% | 20.0% | **\u22125 pp** |\n| Completion rate | 90.0% | 90.0% | 85.0% | \u22125 pp |\n| Avg commands per run | 4.40 | 4.10 | 3.45 | **\u221222%** |\n\nThe headline number is the download-rate drop from 35% to 15%: agents stopped resorting to raw `download` for 20 percentage points worth of questions once `water` and `landuse` verbs existed. The command count improvement (\u221222%) is the other standout: agents are finding the answer faster even on questions where completion rates wobbled.\n\n---\n\n## Per-question trends\n\n| Question | Tier | R01 done / err | R02 done / err | R03 done / err | Direction |\n|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 100% / **100%** | 100% / **100%** | 50% / 50% | errors down, completion regressed |\n| coffee-brooklyn-count | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n| containing-point | 3 | **0%** / 0% | 100% / 0% | 50% / 0% | fixed then regressed |\n| hardware-near-bikepaths-alameda | 5 | 100% / 0% | 50% / 0% | 50% / **50%** | completion dropped; tracebacks appeared |\n| landuse-brooklyn | 4 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| pois-near-point | 3 | 100% / 0% | 100% / **50%** | 100% / 50% | new error emerged, persists |\n| restaurant-categories-brooklyn | 2 | 100% / **50%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| tall-buildings-manhattan | 2 | 100% / **100%** | 100% / 0% | 100% / 0% | fixed \u2713 |\n| water-downtown-boston | 4 | 100% / 0% | 50% / 0% | 100% / 0% | wobbly but recovered |\n| where-boston | 1 | 100% / 0% | 100% / 0% | 100% / 0% | stable \u2713 |\n\n---\n\n## What drove each round's changes\n\n### Report 01 \u2192 Report 02\n\n**Fixes deployed:** `water` and `landuse` verbs; `--where` quoting in docs/skill; full US state names in geocoder; `-r`/`--release` collision fixed on `at`; actionable steering hints.\n\n| Metric | Before | After |\n|---|---|---|\n| Fleet download rate | 35% | 15% |\n| water download rate | 100% | 0% |\n| landuse download rate | 100% | 0% |\n| tall-buildings error rate | 100% | 0% |\n| restaurant error rate | 50% | 0% |\n| containing completion | 0% | 100% |\n\nThe two coverage-gap types (`water`, `land_use`) accounted for the entire 20 pp download-rate drop \u2014 agents immediately used the verbs once they existed.\n\n**New problems exposed:** Adding the verbs revealed a latent path through `categories -t land_use` (now a recognized type, but `categories` still rejects non-place types \u2192 50% error on `landuse-brooklyn`). The `-r` fix on `at` also unmasked `--json` as a group-level-only flag; agents moved from a release-collision error to a bad-option error on `pois-near-point`.\n\n---\n\n### Report 02 \u2192 Report 03\n\n**Fixes deployed:** Concrete ready-to-run tip suggestions from `download`; transit-stop anti-pattern documented in skill; `where --geometry` flag for division polygons.\n\n| Metric | Before | After |\n|---|---|---|\n| busstops error rate | 100% | 50% |\n| busstops avg commands | 12.5 | 6.0 |\n| fleet avg commands | 4.10 | 3.45 |\n\nThe improved `download` hints and the `--geometry` flag helped \u2014 busstops errors halved and command counts dropped substantially. But two new failure modes appeared: `download -t division_area` no longer printed just a tip but proceeded and crashed (traceback), and the `--json` bad-option persisted.\n\n---\n\n## Unnecessary download rate: why it's stuck at 15%\n\nEvery unnecessary download across all three rounds traces to two questions:\n\n- **busstops-coffee-williamsburg**: agents consistently reach for `download -t infrastructure --where subtype=transit --where class=bus_stop`. Transit POIs are `place` features; the soft tip didn't deter them.\n- **hardware-near-bikepaths-alameda**: agents reach for `download -t division_area` to get a county boundary for clipping. No dedicated verb existed; the tip didn't redirect them.\n\nThe 15% floor is these two questions each contributing ~50% unnecessary download across their 2 runs. Nothing else pollutes this metric.\n\n---\n\n## Expected impact of the changes just deployed\n\nThe current branch implements the six proposals from Report 03:\n\n| Proposal | Target error / behavior |\n|---|---|\n| P1: `division_area` \u2192 hard `UsageError` | hardware tracebacks \u2192 clean error + redirect |\n| P2: `boundary` verb | hardware agent has a real verb; TYPE_TO_VERB routes division_area to it |\n| P3: transit infrastructure \u2192 hard `UsageError` | busstops unnecessary downloads become instant redirects |\n| P5: `--json` no-op on data verbs | pois-near-point bad_option error eliminated |\n| P6: `where` uses `_resolve_in_place` fallback | busstops `where Williamsburg, Brooklyn` resolves to Brooklyn bbox instead of exiting 1 |\n\nIf these work as expected:\n- `pois-near-point` error rate: **50% \u2192 0%** (P5)\n- `busstops` error rate: **50% \u2192 \u22640%** (P3 blocks the infra download; P6 fixes the `where` failure)\n- `hardware` traceback errors: **50% \u2192 0%** (P1 turns them into directed UsageErrors)\n- Unnecessary download rate: **15% \u2192 ~0%** (P2/P3 close both remaining sources)\n\nThe remaining stubborn issue is `landuse-brooklyn` `categories -t land_use` \u2014 it now gets a better error message (redirect to `schema` and the `landuse` verb), but the proposal to *actually enumerate* the `class` field for non-place types (P4) was not implemented. That's the one remaining actionable proposal.\n\n---\n\n## Persistent problem questions\n\n### busstops-coffee-williamsburg (tier 5)\nThe hardest question across all three rounds. Two failure modes compound:\n1. `where \"Williamsburg, Brooklyn\"` fails \u2014 neighborhood not in divisions index.\n2. Agent falls back to `download -t infrastructure --where subtype=transit`.\n\nP3 blocks path 2; P6 handles path 1 by falling back to the Brooklyn bbox. The combination should break the error loop. However, even if both fixes land cleanly, this is a complex multi-step task (find bus stops, find coffee shops, find co-located pairs) and tier-5 difficulty may mean some incompletions persist.\n\n### hardware-near-bikepaths-alameda (tier 5)\nRequires: get county boundary \u2192 filter bike paths to county \u2192 find hardware stores near bike paths. The agent consistently needed a division polygon and had no clean path to get one. P1 + P2 together give it `boundary \"Alameda County, CA\"` as a direct verb. This is the change most likely to improve completion rate from 50%.\n\n### landuse-brooklyn (tier 4)\nAgents trying `categories -t land_use` to discover class values is exactly the right behavior \u2014 the error is the CLI refusing them. P4 (full enumeration) remains unimplemented. Until then, the better UsageError message at least points at `overturemaps schema -t land_use` and `overturemaps landuse --class `.\n", + "docs/automated-improvements/report-example-01.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 0% | 0.5 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 100% | 10.5 |\n| landuse-brooklyn | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| pois-near-point | 3 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 50% | 100% | 4.5 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 100% | 100% | 5.0 |\n| water-downtown-boston | 4 | 2 | 100% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `tall-buildings-manhattan` \u00d72\n - `overturemaps --json count -t building --in Manhattan --where height`\n - `overturemaps --json count -t building --in Manhattan --where height`\n- **bad_option** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json categories -t place --in Brooklyn, New York --top 50`\n- **other_error** in `restaurant-categories-brooklyn` \u00d71\n - `overturemaps --json where Brooklyn, New York`\n\n## Coverage gaps (legitimate downloads)\n\n- type `land_use` \u2014 wanted by: landuse-brooklyn\n- type `water` \u2014 wanted by: water-downtown-boston\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Add a water convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.water (water-downtown-boston): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t water` because no verb covers the base/water theme.\n\nAdd a `water` command in overturemaps/cli.py modeled exactly on the existing buildings command (lines 986-1025): same --in/--bbox/--where/-f/-o/-r options, calling safe_reader with type='water'. Add a --class shortcut (ocean, lake, river, ...) mirroring the roads --class pattern (lines 1033/1058-1059) so `overturemaps water --in \"Boston, MA\" --class river` replaces `download -t water`.\n\n### 2. Add a landuse convenience verb _(target: cli)_\n**Evidence:** coverage_gaps.land_use (landuse-brooklyn): download_rate 1.0, unnecessary_download_rate 0.0 \u2014 a legitimate `download -t land_use` because no verb covers the base/land_use theme.\n\nAdd a `landuse` command in overturemaps/cli.py cloning the buildings command body but with type_='land_use', plus a --class shortcut (commercial, residential, recreation, agriculture, ...) like roads --class. Then `overturemaps landuse --in \"Brooklyn\" --class residential` fully replaces `download -t land_use`.\n\n### 3. Emit a steering hint from download when a verb covers the requested type _(target: hint)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg (`download -t infrastructure`) and hardware-near-bikepaths-alameda (`download -t segment`). Agents reach for download even when place/segment/building verbs exist.\n\nIn the download command (overturemaps/cli.py:395), after resolving type_, look it up in a TYPE_TO_VERB map (`{'place':'places','segment':'roads','building':'buildings','address':'addresses','water':'water','land_use':'landuse'}`) and, when present, print a one-line stderr nudge before streaming: e.g. `[overturemaps] Tip: 'overturemaps roads --in ... --class cycleway' covers -t segment with friendlier flags and the same output.` Non-fatal, so existing pipelines still work.\n\n### 4. Quote --where expressions containing < or > in every recipe _(target: skill)_\n**Evidence:** bad_option in tall-buildings-manhattan (both runs): `count -t building --in Manhattan --where height` \u2014 the trailing `>150` was eaten by the shell as a redirection because skill recipe #5 shows `--where height>150` UNQUOTED.\n\nIn overturemaps/data/skill.md, quote every filter that contains an operator: recipe #5 -> `--where 'height>150'`, the filter-syntax block (lines 139-143) -> `--where 'height>100'`, and add an Anti-pattern line: 'Always single-quote --where expressions with < or > so the shell does not treat them as redirection (writes a file named after the number and truncates the filter to just the key).' Mirror the same quoting in README.md recipes.\n\n### 5. Detect operator-less --where and explain the shell-redirection trap _(target: cli)_\n**Evidence:** bad_option in tall-buildings-manhattan: `--where height` reached the CLI with no operator/value because the shell consumed `>150`. parse_where_expr currently just errors generically.\n\nIn overturemaps/filters.py parse_where_expr, when an expression has no recognized operator (=,!=,<,<=,>,>=,in), raise a ValueError with: \"Filter 'height' has no operator. Use K OP V, e.g. --where 'height>150'. If you typed an unquoted > or <, your shell redirected it to a file \u2014 wrap the whole expression in single quotes.\" This surfaces via the existing click.UsageError wrappers (_safe_reader/_safe_count, cli.py:42-55).\n\n### 6. Make where/--in no-match errors actionable for neighborhoods and city/state qualifiers _(target: cli)_\n**Evidence:** other_error in busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\") and restaurant-categories-brooklyn (where \"Brooklyn, New York\"). The geocoder (geocoding.py:144-154) rejects neighborhood names and city/full-state-name qualifiers, and the no_match path (cli.py:570-576) gives no recovery path.\n\nIn where and in _resolve_in_place (cli.py:152-174/566-576), on zero matches retry once with qualifiers dropped to the country level (re-resolve the bare name) and, if that yields hits, name them in the error: \"No division for 'Williamsburg, Brooklyn'. Williamsburg is a neighborhood not in the divisions index; nearest resolvable parent: 'Brooklyn' (locality). Use that, or containing LAT,LON, or --bbox.\" Include this same suggestion in the JSON no_match envelope so agents can act on it programmatically.\n\n### 7. Accept full US state names as --in/where qualifiers _(target: cli)_\n**Evidence:** other_error/bad_option in restaurant-categories-brooklyn: where \"Brooklyn, New York\" and categories ... --in \"Brooklyn, New York\" fail because _normalize_qualifier (geocoding.py:97-100) only aliases country names; 'New York' is not matched against region 'US-NY'.\n\nAdd a US-state (and optionally global subdivision) name->code map in overturemaps/geocoding.py and extend _normalize_qualifier so 'New York'->'NY', 'California'->'CA', etc., then keep the existing region_suffix_match on '-NY'. This makes where \"Brooklyn, New York\" resolve the same as \"Brooklyn, NY\" / \"Brooklyn, US-NY\".\n\n### 8. Document that transit stops (bus stops) live in place, not infrastructure _(target: skill)_\n**Evidence:** unnecessary_download in busstops-coffee-williamsburg: all runs did `download -t infrastructure --where subtype=transit --where class=bus_stop`, when the intended path is `places --category bus_stop`.\n\nIn overturemaps/data/skill.md schema cheatsheet place row, note that transit POIs are places: add bus_stop, bus_station, train_station to the categories.primary examples, and add a Recipe: `overturemaps places --in \"Williamsburg, Brooklyn\" --category bus_stop`. Add an Anti-pattern: 'Bus stops, stations, and most named transit points are place features (categories.primary=bus_stop) \u2014 use places --category, not download -t infrastructure.'\n\n### 9. Show that roads covers bike paths/footways via --class cycleway _(target: skill)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: a run used `download -t segment --where class=cycleway` instead of the roads verb, which already supports --class and maps to the segment type (cli.py:1042-1072).\n\nIn overturemaps/data/skill.md, broaden recipe #6 and the segment cheatsheet row to state roads returns ALL transportation segments, not just cars, and add a bike-path recipe: `overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq -o bikepaths.jsonl`. List footway/path/cycleway among the --class values so agents stop falling back to `download -t segment`.\n\n### 10. Provide division polygon geometry without download -t division_area _(target: cli)_\n**Evidence:** unnecessary_download in hardware-near-bikepaths-alameda: `download -t division_area --in \"Alameda County\" --where subtype=county` \u2014 the agent needed the county polygon for a spatial join, but where only returns a bbox (cli.py:586-600) and no verb emits division geometry.\n\nAdd a --geometry/--geojson flag to the where command (cli.py:561) that, when set, fetches and emits the division_area polygon as a GeoJSON Feature (reuse the _prefetch_polygons / division_area S3 path already in cli.py:1289-1330). Document it as the supported way to get a boundary for clipping/joins, e.g. `overturemaps where \"Alameda County, CA\" --geometry > county.geojson`, removing the need for `download -t division_area`.\n", + "docs/automated-improvements/report-example-02.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 100% | 100% | 100% | 100% | 12.5 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 50% | 50% | 0% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 50% | 4.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **other_error** in `busstops-coffee-williamsburg` \u00d72\n - `overturemaps --json where Williamsburg, Brooklyn`\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 15`\n- **malformed_bbox_or_coords** in `pois-near-point` \u00d71\n - `overturemaps --json at 40.7128,-74.0060 -t place -r 150`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit -f geojsonseq -o /tmp/wburg_transit.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.700,-73.930,40.730 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/wburg_busstops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.935,40.725 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t segment --in Alameda County, CA --where class=cycleway -f geojsonseq -o /tmp/bike_paths_alameda.jsonl`\n - `overturemaps download -t division_area --in Alameda County, CA --where subtype=county -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Fix skill recipe #15 \u2014 its own bus-stop example uses a neighborhood that never resolves _(target: skill)_\n**Evidence:** busstops-coffee-williamsburg: error_rate 1.0 and unnecessary_download_rate 1.0 across both runs. The failing command (other_error cluster, count 2) is `--json where \"Williamsburg, Brooklyn\"`. Skill recipe #15 literally instructs `places --in \"Williamsburg, Brooklyn\" --category bus_stop`, but Williamsburg is a neighborhood absent from Overture's divisions index, so --in fails and the agent fell back to `download -t infrastructure --where subtype=transit --where class=bus_stop`. The skill's own anti-pattern section warns neighborhoods don't resolve, contradicting its example.\n\nRewrite recipe #15 in overturemaps/data/skill.md so it does not pass a neighborhood to --in. Show the resolvable two-step: `BBOX=$(overturemaps --json where \"Brooklyn, NY\" | jq -r '.bbox|join(\",\")')` then `overturemaps places --bbox \"$BBOX\" --category bus_stop`. Add an inline note: 'Neighborhoods (Williamsburg, SoHo, downtown X) are not in the divisions index \u2014 resolve the parent locality's bbox first, never pass the neighborhood to --in.'\n\n### 2. Add a download steering hint for -t infrastructure pointing transit asks to `places` _(target: hint)_\n**Evidence:** busstops-coffee-williamsburg: all unnecessary downloads were `download -t infrastructure --where subtype=transit --where class=bus_stop`. TYPE_TO_VERB (cli.py:277-284) covers place/segment/building/address/water/land_use but NOT infrastructure, so the steering hint at cli.py:445-452 never fires for `-t infrastructure` \u2014 the agent gets zero nudge.\n\nIn download() (cli.py), add a special-case branch when type_ == 'infrastructure': emit `[overturemaps] Tip: transit stops (bus_stop, bus_station, train_station) are `place` features \u2014 use `overturemaps places --category bus_stop`. For non-transit infrastructure, download is the right tool.` This catches the exact subtype=transit/class=bus_stop pattern that drove every busstops download.\n\n### 3. Add a download steering hint for -t division_area pointing to `where \u2026 --geometry` _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: unnecessary download `download -t division_area --in \"Alameda County, CA\" --where subtype=county` (fetching a boundary for the spatial join). division_area is not in TYPE_TO_VERB (cli.py:277), so no hint fires, even though `where \u2026 --geometry` is the supported boundary path (recipe #16 / anti-pattern at skill.md:217).\n\nIn download() add a special-case for type_ == 'division_area': emit `[overturemaps] Tip: to get a boundary polygon use `overturemaps where \"\" --geometry` (emits a GeoJSON Feature for clipping/joins) instead of `download -t division_area`.` Reuse the --in value verbatim in the suggested command when present.\n\n### 4. Make the download steering hint print a ready-to-run verb command, not just '--help' _(target: hint)_\n**Evidence:** hardware-near-bikepaths-alameda: `download -t segment --in \"Alameda County, CA\" --where class=cycleway` was used in 50% of runs even though segment\u2192roads IS in TYPE_TO_VERB and a hint fires. The current hint (cli.py:447-452) only says 'See `overturemaps roads --help`', which the agent ignored on stderr rather than re-deriving the equivalent invocation.\n\nRewrite the hint to translate the user's actual flags into the verb form and print it as a copy-pasteable command, e.g. `Try instead: overturemaps roads --in \"Alameda County, CA\" --class cycleway -f geojsonseq`. Map `--where class=VAL`\u2192`--class`, `--where categories.primary=VAL`\u2192`--category`, and carry through --in/--bbox/-f/-o. A concrete equivalent command is far more likely to be acted on than a pointer to --help.\n\n### 5. Let `categories` accept land_use/water/segment (or fail with a pointer) instead of an invalid-choice error _(target: cli)_\n**Evidence:** landuse-brooklyn: error_rate 0.5, bad_option cluster \u2014 `categories -t land_use --in \"Brooklyn, NY\" --top 15`. The categories command's -t is `click.Choice([\"place\"])` (cli.py:852-854), so land_use is rejected with a raw Click invalid-choice error. The agent was trying to discover land_use `class` values to filter on.\n\nExtend categories() in cli.py to accept land_use/water/segment and enumerate the relevant classifying field (`class`) rather than `categories.primary`, branching on type_. If keeping it place-only, replace the Choice failure with a click.UsageError: 'categories enumerates place categories. For land_use/water/segment the field is `class` \u2014 run `overturemaps --json schema -t land_use` or filter directly with `overturemaps landuse --class `.' Either change removes the error and the resulting download fallback.\n\n### 6. Give `--radius` the `-r` short flag on `at` (release collision drives a fake bad-coords error) _(target: cli)_\n**Evidence:** pois-near-point: error_rate 0.5 \u2014 `at 40.7128,-74.0060 -t place -r 150`. The agent used `-r 150` intending a 150 m radius, but on `at` (cli.py:1308) `-r` is bound to --release, so '150' is validated as a release and fails; --radius (cli.py:1299) has no short flag, so `-r` is the natural-but-wrong reach on a proximity command.\n\nOn the `at` command only, bind `-r`/`--radius` to the radius option and make release long-only (`--release`, drop its `-r` alias). Radius is the core parameter for a nearest-neighbor command; release is rarely set there. This matches agent intuition and eliminates the error class. As a backstop, have validate_release emit a targeted hint when the value is a bare small integer ('looks like a radius \u2014 did you mean --radius?').\n\n### 7. Make verbs fall back to the parent locality on a 'Neighborhood, Parent' query instead of hard-failing _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg (where \"Williamsburg, Brooklyn\" exits non-zero, agent improvises a download) and water-downtown-boston (completion_rate 0.5, no download/error logged \u2014 a 'downtown Boston' neighborhood that likely didn't resolve and the run stalled). `_no_match_help` (cli.py:152-179) already retries the bare name and suggests a parent/bbox, but the agent still didn't recover and either errored or gave up.\n\nWhen `--in`/`where` gets a 'Name, Qualifier' query that doesn't resolve but the parent qualifier (or bare name) does, auto-resolve to that parent's bbox, proceed, and warn on stderr (`[overturemaps] 'Williamsburg, Brooklyn' not in divisions; using parent 'Brooklyn' bbox`). For the verbs (places/at/water/etc.) this means a neighborhood query degrades to a valid bounded query instead of exiting non-zero \u2014 so the agent neither errors nor reaches for download.\n\n", + "docs/automated-improvements/report-example-03.md": "# Agent-Usability Eval Report\n\nTotal runs scored: **20**\n\n## Per-question rates\n\n| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\n|---|---|---|---|---|---|---|---|\n| busstops-coffee-williamsburg | 5 | 2 | 50% | 50% | 50% | 50% | 6.0 |\n| coffee-brooklyn-count | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n| containing-point | 3 | 2 | 0% | 0% | 0% | 50% | 0.0 |\n| hardware-near-bikepaths-alameda | 5 | 2 | 100% | 100% | 50% | 50% | 11.5 |\n| landuse-brooklyn | 4 | 2 | 0% | 0% | 50% | 100% | 3.5 |\n| pois-near-point | 3 | 2 | 0% | 0% | 50% | 100% | 2.5 |\n| restaurant-categories-brooklyn | 2 | 2 | 0% | 0% | 0% | 100% | 2.0 |\n| tall-buildings-manhattan | 2 | 2 | 0% | 0% | 0% | 100% | 4.0 |\n| water-downtown-boston | 4 | 2 | 0% | 0% | 0% | 100% | 3.0 |\n| where-boston | 1 | 2 | 0% | 0% | 0% | 100% | 1.0 |\n\n## Ranked error clusters\n\n- **traceback** in `hardware-near-bikepaths-alameda` \u00d72\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n- **malformed_bbox_or_coords** in `busstops-coffee-williamsburg` \u00d71\n - `overturemaps --json where Williamsburg, Brooklyn`\n- **bad_option** in `landuse-brooklyn` \u00d71\n - `overturemaps --json categories -t land_use --in Brooklyn, NY --top 20`\n- **bad_option** in `pois-near-point` \u00d71\n - `overturemaps at 40.7128,-74.0060 -t place --radius 150 --json`\n\n## Coverage gaps (legitimate downloads)\n\n_None._\n\n## Unnecessary download (agent failures)\n\n- `busstops-coffee-williamsburg`:\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 -f geojsonseq`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n - `overturemaps download -t infrastructure --bbox -73.975,40.695,-73.928,40.724 --where subtype=transit --where class=bus_stop -f geojsonseq -o /tmp/bus_stops.jsonl`\n- `hardware-near-bikepaths-alameda`:\n - `overturemaps download -t division_area --bbox -122.374,37.454,-121.469,37.907 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 -f geojsonseq`\n - `overturemaps download -t division_area --bbox -122.37383,37.45391,-121.46908,37.90669 --where division_id=9695a507-d4d5-4230-91e3-604f70c9315f -f geojsonseq`\n\n## Proposed improvements\n\n### 1. Stop `download -t division_area` from raising a traceback; redirect to `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: 2 tracebacks from `download -t division_area --bbox ... -f geojsonseq` (with and without --where division_id). download_rate 1.0, error_rate 0.5. A steering tip already prints for division_area (cli.py:521-528) but the download still proceeds and crashes.\n\nIn the `download` command, when type_ == 'division_area', short-circuit before reading S3: raise a clean click.UsageError that names the exact replacement, e.g. `division_area is not downloadable this way \u2014 for a boundary polygon run: overturemaps where \"\" --geometry`. This converts an uncaught traceback into a directed, zero-cost error and forces the agent onto the supported verb instead of retrying the failing download.\n\n### 2. Add a `boundary` verb aliasing `where --geometry` _(target: cli)_\n**Evidence:** hardware-near-bikepaths-alameda: agent needed a county polygon to clip 'hardware near bike paths' and reached for `download -t division_area` (download_rate 1.0, avg_commands 11.5). `where --geometry` exists and is documented (skill recipe 16) but the agent never found a verb matching the noun 'boundary'/'polygon'.\n\nRegister a `boundary ` command that internally calls the same code path as `where --geometry` (emit the division_area polygon as a GeoJSON Feature on stdout). Add 'division_area' -> 'boundary' to TYPE_TO_VERB (cli.py:310-317) so the download tip names a real verb. A noun-shaped verb is far more discoverable to an agent than a flag on an unrelated command.\n\n### 3. Hard-redirect transit-class infrastructure downloads to `places --category` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: agent ran `download -t infrastructure --where subtype=transit --where class=bus_stop` (unnecessary_download_rate 0.5, tier 5). The infrastructure tip (cli.py:513-520) prints but the download still runs.\n\nIn `download`, when type_ == 'infrastructure' and a --where targets class in {bus_stop, bus_station, train_station, transit, ...} or subtype=transit, raise a click.UsageError that prints the ready-to-run replacement (`overturemaps places --category bus_stop --in/--bbox ...`) instead of emitting an advisory tip and proceeding. Turning the soft nudge into a blocking redirect removes the unnecessary download entirely.\n\n### 4. Make `categories` enumerate `class` for non-place types instead of erroring _(target: cli)_\n**Evidence:** landuse-brooklyn: `categories -t land_use --in \"Brooklyn, NY\" --top 20` produced a bad_option/UsageError (cli.py:940-952). The agent was doing exactly the right discovery step (what classes exist here?) but the command refuses any non-place type.\n\nGeneralize `categories`: for type_ == 'place' enumerate categories.primary (current behavior); for other types (land_use, water, segment, building) enumerate the `class` field value_counts over the same bbox/--in. This serves the agent's discovery intent and eliminates the error class rather than just rewording it.\n\n### 5. Accept `--json` as a no-op on data subcommands so trailing `--json` doesn't error _(target: cli)_\n**Evidence:** pois-near-point: `at 40.7128,-74.0060 -t place --radius 150 --json` failed as bad_option. `--json` is a group-level flag (cli.py:446) defined only on the root group, so placing it after a data subcommand yields 'no such option: --json'.\n\nAdd a hidden, no-op `--json` flag to the data verbs (`at`, `places`, `roads`, `buildings`, `water`, `landuse`, `addresses`, `sample`) that is silently accepted (these already emit structured GeoJSON). This absorbs the extremely common agent habit of appending `--json` everywhere and prevents the whole bad_option class for data commands.\n\n### 6. Give `where` the same parent/neighborhood fallback as `--in` _(target: cli)_\n**Evidence:** busstops-coffee-williamsburg: `where \"Williamsburg, Brooklyn\"` errored (count 1, completion_rate 0.5). The `where` command calls resolve() directly + _no_match_help and exits 1 (cli.py:700-707), while `_resolve_in_place` (cli.py:182-237) already retries the bare name, scopes to the parent's region, and falls back to the parent bbox.\n\nRefactor `where` to reuse the _resolve_in_place fallback chain: on no direct match, retry the bare name, try scoping each qualifier as a parent locality, and surface the parent division (with a stderr note) instead of exiting 1. Neighborhood+borough queries like 'Williamsburg, Brooklyn' then resolve to a usable bbox rather than dead-ending.\n\n", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md": "# Agent-Friendly CLI Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Extend `overturemaps` with place-name geocoding, push-down attribute filters, count/sample previews, intent verbs, JSON metadata output, and a Claude Code / AGENTS.md Skill installer \u2014 strictly additive on top of the existing CLI.\n\n**Architecture:** Six new modules (`filters`, `cache`, `geocoding`, `introspection`, `intents`, `skill_installer`) plus a package data file (`data/skill.md`). `cli.py` gains new commands but each remains a thin Click adapter. The existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline is reused unchanged; new flags compose into the same filter expression. The divisions index is built lazily on first `--in`/`where`/`containing` call and cached under XDG cache home.\n\n**Tech Stack:** Python 3.10+, `click`, `pyarrow` (datasets, compute, parquet), `shapely`, `orjson`, `tqdm`, `pytest` + `CliRunner`. No new runtime dependencies.\n\n**Spec:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\n## Phase Layout\n\nThis plan is organized into five phases. Each phase ends with a shippable state \u2014 pause for review between phases if running via `subagent-driven-development`.\n\n| Phase | Tasks | Outcome |\n|---|---|---|\n| **1. Foundation** | 1.1 \u2013 1.8 | `download --in \"Boston\" --where height>50` works. |\n| **2. Metadata commands** | 2.1 \u2013 2.10 | Full self-describing surface (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `cache`) with `--json`. |\n| **3. Intent verbs** | 3.1 \u2013 3.6 | `places`, `buildings`, `roads`, `at`, `containing`. |\n| **4. Skill installer** | 4.1 \u2013 4.3 | `install-skill` writes Claude SKILL.md and/or `AGENTS.md`. |\n| **5. Docs + release** | 5.1 \u2013 5.2 | README updated; version bumped to `1.1.0`. |\n\n## Repository Conventions (read once before starting)\n\n- **Tests** use `pytest` with `monkeypatch` (not `pytest-mock` fixtures).\n- **CLI tests** use `click.testing.CliRunner` and import `cli` from `overturemaps.cli`.\n- **Network-touching tests** set a module-level `pytestmark = pytest.mark.integration` (see `tests/test_changelog.py` and `tests/test_gers.py` for examples).\n- **Run unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Run integration tests:** `uv run pytest tests/ -m integration -v` (slow; needs network)\n- **Click commands** live in `overturemaps/cli.py`; the module is the source of truth for the CLI group.\n- **stdout = data, stderr = humans.** Banners, warnings, progress, GERS info all go to stderr. JSON metadata output goes to stdout when `--json` is set.\n- **Commits** are small and frequent. Each task ends with a commit using the format from recent git history (no co-author trailer in this project; check `git log --oneline -5` before your first commit and match the prevailing style).\n\n---\n\n# Phase 1 \u2014 Foundation\n\nEnd state: `overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o out.jsonl` produces buildings \u2265 50 m tall in the Boston, MA bbox.\n\n---\n\n## Task 1.1: Filter expression parser\n\nParses `--where \"KEY OP VALUE\"` strings into structured tuples. No schema validation yet (added in Task 1.3).\n\n**Files:**\n- Create: `overturemaps/filters.py`\n- Create: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_filters.py`:\n\n```python\n\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom overturemaps.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"Could not parse\"):\n parse_where_expr(\"just_a_key\")\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: ImportError or `ModuleNotFoundError: No module named 'overturemaps.filters'`.\n\n- [ ] **Step 3: Write the parser**\n\nCreate `overturemaps/filters.py`:\n\n```python\n\"\"\"Parser and PyArrow translator for the --where filter flag.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, List, Union\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\n\n\n# Operators ordered longest-first so the splitter doesn't mistake `>=` for `>`.\n_OPERATORS = [\"<=\", \">=\", \"!=\", \" in \", \"=\", \"<\", \">\"]\n\n\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str # one of: =, !=, <, <=, >, >=, in\n value: Any # str | int | float | bool | list\n\n\ndef _coerce_scalar(raw: str) -> Union[str, int, float, bool]:\n s = raw.strip()\n if s.lower() == \"true\":\n return True\n if s.lower() == \"false\":\n return False\n try:\n return int(s)\n except ValueError:\n pass\n try:\n return float(s)\n except ValueError:\n pass\n # strip optional surrounding quotes\n if len(s) >= 2 and s[0] == s[-1] and s[0] in (\"'\", '\"'):\n return s[1:-1]\n return s\n\n\ndef _parse_list_value(raw: str) -> List[Any]:\n s = raw.strip()\n if not (s.startswith(\"[\") and s.endswith(\"]\")):\n raise ValueError(f\"`in` value must be a [a,b,c] list, got: {raw!r}\")\n inner = s[1:-1]\n parts = [p for p in (chunk.strip() for chunk in inner.split(\",\")) if p]\n return [_coerce_scalar(p) for p in parts]\n\n\ndef parse_where_expr(expr: str) -> ParsedFilter:\n \"\"\"Parse a single --where expression of the form 'KEY OP VALUE'.\"\"\"\n # Locate the leftmost occurrence of any operator, preferring longer matches.\n best_idx = -1\n best_op = None\n for op in _OPERATORS:\n idx = expr.find(op)\n if idx == -1:\n continue\n # Prefer earlier-starting matches; on tie, prefer longer operator\n if best_idx == -1 or idx < best_idx or (idx == best_idx and len(op) > len(best_op)):\n best_idx = idx\n best_op = op\n\n if best_op is None:\n raise ValueError(f\"Could not parse --where expression: {expr!r}\")\n\n key = expr[:best_idx].strip()\n value_raw = expr[best_idx + len(best_op):].strip()\n op = best_op.strip() # ' in ' -> 'in'\n\n if not key:\n raise ValueError(f\"--where expression has empty key: {expr!r}\")\n if not value_raw:\n raise ValueError(f\"--where expression has empty value: {expr!r}\")\n\n if op == \"in\":\n value = _parse_list_value(value_raw)\n else:\n value = _coerce_scalar(value_raw)\n\n return ParsedFilter(key=key, op=op, value=value)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all 17 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Add --where expression parser (filters.py)\n\nParses 'KEY OP VALUE' strings into ParsedFilter dataclasses with\nauto-typed values (int/float/bool/string) and [a,b,c] list literals.\nSchema validation and PyArrow translation come next.\"\n```\n\n---\n\n## Task 1.2: PyArrow Expression translation for `ParsedFilter`\n\nTurn a `ParsedFilter` into a `pyarrow.compute.Expression` using nested struct field access.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestToPyarrowExpression -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'to_pyarrow_expression'`.\n\n- [ ] **Step 3: Add the translator**\n\nReplace the `ParsedFilter` dataclass in `overturemaps/filters.py` with this version (keep all other code in the file):\n\n```python\n@dataclass(frozen=True)\nclass ParsedFilter:\n key: str\n op: str\n value: Any\n\n def to_pyarrow_expression(self, schema: pa.Schema) -> pc.Expression:\n \"\"\"Build a pc.Expression resolving dotted keys against `schema`.\"\"\"\n # Walk dotted path -> pc.field(...) with nested struct access.\n parts = self.key.split(\".\")\n field_ref = pc.field(*parts) if len(parts) > 1 else pc.field(parts[0])\n\n if self.op == \"=\":\n return field_ref == self.value\n if self.op == \"!=\":\n return field_ref != self.value\n if self.op == \"<\":\n return field_ref < self.value\n if self.op == \"<=\":\n return field_ref <= self.value\n if self.op == \">\":\n return field_ref > self.value\n if self.op == \">=\":\n return field_ref >= self.value\n if self.op == \"in\":\n return field_ref.isin(self.value)\n raise ValueError(f\"Unsupported operator: {self.op!r}\")\n\n\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine multiple filters into one expression.\"\"\"\n if not filters:\n return None\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass (parser + translator).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Translate ParsedFilter to pyarrow.compute.Expression\n\nSupports dotted nested struct keys (e.g. categories.primary) and all\nseven operators. Adds combine() to AND-conjunct multiple --where flags.\"\n```\n\n---\n\n## Task 1.3: Schema-aware validation for filters\n\nReject `--where` expressions that reference fields that don't exist on the type's schema, with a helpful \"did you mean\" listing.\n\n**Files:**\n- Modify: `overturemaps/filters.py`\n- Modify: `tests/test_filters.py`\n\n- [ ] **Step 1: Write the failing test**\n\nAppend to `tests/test_filters.py`:\n\n```python\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_filters.py::TestValidateAgainstSchema -v`\nExpected: `AttributeError: 'ParsedFilter' object has no attribute 'validate_against_schema'`.\n\n- [ ] **Step 3: Implement validation**\n\nAdd this method inside the `ParsedFilter` class in `overturemaps/filters.py`:\n\n```python\n def validate_against_schema(self, schema: pa.Schema) -> None:\n \"\"\"Verify self.key resolves to a field in `schema`; raise ValueError otherwise.\"\"\"\n parts = self.key.split(\".\")\n # Top-level lookup\n top = parts[0]\n if top not in schema.names:\n raise ValueError(\n f\"Unknown field {self.key!r}. Available fields: \"\n f\"{', '.join(sorted(schema.names))}\"\n )\n # Walk into nested struct types if dotted\n current_type = schema.field(top).type\n for part in parts[1:]:\n if not pa.types.is_struct(current_type):\n raise ValueError(\n f\"Field {self.key!r} is invalid: \"\n f\"{'.'.join(parts[:parts.index(part)])} is not a struct\"\n )\n child_names = [current_type.field(i).name for i in range(current_type.num_fields)]\n if part not in child_names:\n raise ValueError(\n f\"Unknown field {self.key!r}. \"\n f\"Available subfields: {', '.join(sorted(child_names))}\"\n )\n current_type = current_type.field(child_names.index(part)).type\n```\n\nAlso extend `combine()` to validate first:\n\n```python\ndef combine(filters: List[ParsedFilter], schema: pa.Schema) -> pc.Expression | None:\n \"\"\"AND-combine filters, validating each against the schema.\"\"\"\n if not filters:\n return None\n for f in filters:\n f.validate_against_schema(schema)\n exprs = [f.to_pyarrow_expression(schema) for f in filters]\n result = exprs[0]\n for e in exprs[1:]:\n result = result & e\n return result\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_filters.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/filters.py tests/test_filters.py\ngit commit -m \"Validate --where keys against the type's PyArrow schema\n\nMisnamed fields fail before the network call with a 'available fields'\nlisting, which is the agent's primary safety net against typos.\"\n```\n\n---\n\n## Task 1.4: Cache module \u2014 XDG path, info, clear\n\nThe on-disk cache stores the divisions index. This task implements path resolution and read-side helpers. Index building comes in Task 1.5.\n\n**Files:**\n- Create: `overturemaps/cache.py`\n- Create: `tests/test_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cache.py`:\n\n```python\n\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"overturemaps\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"overturemaps\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"overturemaps\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.cache'`.\n\n- [ ] **Step 3: Implement the cache module**\n\nCreate `overturemaps/cache.py`:\n\n```python\n\"\"\"On-disk cache for the divisions geocoding index.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Optional\n\n\n_INDEX_FILE_RE = re.compile(r\"^divisions-index-(.+)\\.parquet$\")\n\n\ndef cache_dir() -> Path:\n \"\"\"Return the overturemaps cache directory, respecting XDG_CACHE_HOME.\"\"\"\n xdg = os.environ.get(\"XDG_CACHE_HOME\")\n if xdg:\n return Path(xdg) / \"overturemaps\"\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".cache\" / \"overturemaps\"\n\n\ndef index_path(release: str) -> Path:\n \"\"\"Path to the divisions-index file for a given release.\"\"\"\n return cache_dir() / f\"divisions-index-{release}.parquet\"\n\n\ndef _scan_existing_indexes() -> list[tuple[str, Path]]:\n \"\"\"Return (release, path) for every divisions-index file present on disk.\"\"\"\n d = cache_dir()\n if not d.exists():\n return []\n out: list[tuple[str, Path]] = []\n for entry in d.iterdir():\n if not entry.is_file():\n continue\n m = _INDEX_FILE_RE.match(entry.name)\n if m:\n out.append((m.group(1), entry))\n return out\n\n\ndef cache_info(latest_release: Optional[str] = None) -> dict:\n \"\"\"Return a JSON-serializable summary of the current cache state.\"\"\"\n indexes = _scan_existing_indexes()\n if indexes:\n # Pick the newest (alphabetical sort is fine: release IDs are date-prefixed)\n indexes.sort(key=lambda pair: pair[0], reverse=True)\n current_release, current_path = indexes[0]\n size = current_path.stat().st_size\n else:\n current_release = None\n size = 0\n\n up_to_date = (\n current_release is not None\n and latest_release is not None\n and current_release == latest_release\n )\n\n # `index_path` reports where the *current* (latest) index *would* live.\n target_release = latest_release or current_release or \"\"\n return {\n \"index_path\": str(index_path(target_release)) if target_release else str(cache_dir()),\n \"index_release\": current_release,\n \"latest_release\": latest_release,\n \"up_to_date\": up_to_date,\n \"size_bytes\": size,\n }\n\n\ndef clear_cache() -> int:\n \"\"\"Remove every divisions-index file. Returns the number of files removed.\"\"\"\n indexes = _scan_existing_indexes()\n for _release, path in indexes:\n path.unlink()\n return len(indexes)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all 8 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py\ngit commit -m \"Add cache module for divisions-index storage\n\nXDG-respecting path resolution, cache_info(), clear_cache(). Index build\narrives in the next task.\"\n```\n\n---\n\n## Task 1.5: Build the divisions index from S3\n\n`build_index` reads `division` + `division_area` from the latest release on S3 and writes a compact parquet file under the cache directory. `ensure_index` checks freshness and triggers a rebuild only when needed.\n\nThis task uses real network in an integration test marked appropriately.\n\n**Files:**\n- Modify: `overturemaps/cache.py`\n- Modify: `tests/test_cache.py`\n- Create: `tests/test_cache_integration.py`\n\n- [ ] **Step 1: Write the failing unit test (mocked S3)**\n\nAppend to `tests/test_cache.py`:\n\n```python\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n ],\n type=pa.struct([(\"primary\", pa.string()), (\"common\", pa.string())]),\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"GB\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\"],\n \"admin_level\": [8, 8, 8],\n \"population\": [654776, 118000, 41000],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\"],\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # 3 input rows, all joined successfully\n assert table.num_rows == 3\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"name_common\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from overturemaps import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: `AttributeError: module 'overturemaps.cache' has no attribute 'build_index'`.\n\n- [ ] **Step 3: Implement build_index and ensure_index**\n\nAppend to `overturemaps/cache.py`:\n\n```python\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pyarrow.dataset as ds\nimport pyarrow.fs as _fs\nimport pyarrow.parquet as pq\n\n\n_S3_BUCKET = \"overturemaps-us-west-2\"\n\n\ndef _read_partition_columns(theme: str, type_: str, release: str, columns: list[str]) -> pa.Table:\n \"\"\"Read selected columns from a divisions partition on S3.\"\"\"\n path = f\"{_S3_BUCKET}/release/{release}/theme={theme}/type={type_}/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n return dataset.to_table(columns=columns)\n\n\ndef build_index(release: str) -> Path:\n \"\"\"Read divisions data from S3 for `release` and write the local index parquet.\"\"\"\n div_cols = [\n \"id\", \"names\", \"subtype\", \"class\", \"country\", \"region\",\n \"admin_level\", \"population\", \"parent_division_id\",\n ]\n area_cols = [\"division_id\", \"bbox\"]\n\n div = _read_partition_columns(\"divisions\", \"division\", release, div_cols)\n area = _read_partition_columns(\"divisions\", \"division_area\", release, area_cols)\n\n # Flatten names struct -> name_primary, name_common\n names_col = div.column(\"names\").combine_chunks()\n name_primary = pc.struct_field(names_col, \"primary\")\n name_common = pc.struct_field(names_col, \"common\")\n\n # Each division can have multiple division_area rows; combine to a single\n # bbox by taking min(xmin), min(ymin), max(xmax), max(ymax) per division_id.\n bbox_struct = area.column(\"bbox\").combine_chunks()\n area_flat = pa.table({\n \"division_id\": area.column(\"division_id\"),\n \"xmin\": pc.struct_field(bbox_struct, \"xmin\"),\n \"ymin\": pc.struct_field(bbox_struct, \"ymin\"),\n \"xmax\": pc.struct_field(bbox_struct, \"xmax\"),\n \"ymax\": pc.struct_field(bbox_struct, \"ymax\"),\n })\n bbox_agg = area_flat.group_by(\"division_id\").aggregate([\n (\"xmin\", \"min\"),\n (\"ymin\", \"min\"),\n (\"xmax\", \"max\"),\n (\"ymax\", \"max\"),\n ]).rename_columns([\n \"division_id\", \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n ])\n\n # Build the flat division table (without the names struct).\n div_flat = pa.table({\n \"id\": div.column(\"id\"),\n \"name_primary\": name_primary,\n \"name_common\": name_common,\n \"subtype\": div.column(\"subtype\"),\n \"class\": div.column(\"class\"),\n \"country\": div.column(\"country\"),\n \"region\": div.column(\"region\"),\n \"admin_level\": div.column(\"admin_level\"),\n \"population\": div.column(\"population\"),\n \"parent_division_id\": div.column(\"parent_division_id\"),\n })\n\n # Inner join on id <-> division_id\n joined = div_flat.join(bbox_agg, keys=\"id\", right_keys=\"division_id\", join_type=\"inner\")\n\n out = index_path(release)\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(joined, out)\n return out\n\n\ndef ensure_index(latest_release: str) -> Path:\n \"\"\"Return the path to a current index, building it if missing or stale.\"\"\"\n target = index_path(latest_release)\n if target.exists():\n return target\n return build_index(latest_release)\n```\n\nNote: `pa.Table.join` is the PyArrow >= 14 API and is supported by the project's pinned `pyarrow>=15.0.2`. If the implementer hits a version surprise, the fallback is to materialize via pandas, but that should not be needed.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cache.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the integration test**\n\nCreate `tests/test_cache_integration.py`:\n\n```python\n\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom overturemaps.cache import build_index, index_path\nfrom overturemaps.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n```\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS (slow \u2014 may take 30\u201390 seconds; one-time S3 read).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add overturemaps/cache.py tests/test_cache.py tests/test_cache_integration.py\ngit commit -m \"Build the divisions index from S3 on first use\n\nbuild_index() joins division + division_area, flattens the names struct,\naggregates polygon bboxes per division, and writes a compact parquet to\nthe cache dir. ensure_index() skips when the cache is already current.\"\n```\n\n---\n\n## Task 1.6: Geocoding lookup\n\n`resolve(name)` returns ranked matches against the cached index; `best_match` is the convenience wrapper that picks one.\n\n**Files:**\n- Create: `overturemaps/geocoding.py`\n- Create: `tests/test_geocoding.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_geocoding.py`:\n\n```python\n\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom overturemaps.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\"],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n ],\n \"name_common\": [None, None, None, None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\"],\n \"class\": [None, None, None, None, None, None],\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\"],\n \"region\": [None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\"],\n \"admin_level\": [2, 4, 8, 8, 8, 8],\n \"population\": [330000000, 7000000, 654776, 41000, 118000, 145000],\n \"parent_division_id\": [None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\"],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22],\n })\n out = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"overturemaps.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.geocoding'`.\n\n- [ ] **Step 3: Implement geocoding**\n\nCreate `overturemaps/geocoding.py`:\n\n```python\n\"\"\"Resolve place names to Overture division features via the local index.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport pyarrow.compute as pc\nimport pyarrow.parquet as pq\n\nfrom .cache import ensure_index\n\n\n@dataclass(frozen=True)\nclass Division:\n id: str\n name: str\n subtype: str\n country: Optional[str]\n region: Optional[str]\n admin_level: int\n population: Optional[int]\n parent_division_id: Optional[str]\n bbox: tuple[float, float, float, float] # xmin, ymin, xmax, ymax\n\n def as_dict(self) -> dict:\n return {\n \"id\": self.id,\n \"name\": self.name,\n \"subtype\": self.subtype,\n \"country\": self.country,\n \"region\": self.region,\n \"admin_level\": self.admin_level,\n \"population\": self.population,\n \"parent_division_id\": self.parent_division_id,\n \"bbox\": list(self.bbox),\n }\n\n\ndef _latest_release() -> str:\n # Imported lazily so tests can monkeypatch without S3 calls.\n from .core import get_latest_release\n return get_latest_release()\n\n\ndef _parse_query(query: str) -> tuple[str, list[str]]:\n \"\"\"Split 'Boston, US-MA' into ('Boston', ['US-MA']).\"\"\"\n parts = [p.strip() for p in query.split(\",\")]\n name = parts[0]\n qualifiers = [p for p in parts[1:] if p]\n return name, qualifiers\n\n\ndef _load_index_table():\n release = _latest_release()\n path = ensure_index(release)\n return pq.read_table(path)\n\n\ndef resolve(query: str) -> List[Division]:\n \"\"\"Return all divisions matching the query (name + optional qualifiers).\n\n Returns a list ordered by best-match-first: lower admin_level (larger area)\n is preferred only after population. Population desc breaks remaining ties.\n Inner divisions (higher admin_level) are preferred when name matches exactly\n at multiple levels.\n \"\"\"\n name, qualifiers = _parse_query(query)\n table = _load_index_table()\n\n # Case-insensitive equality on name_primary or name_common\n name_lower = name.lower()\n primary = pc.utf8_lower(table.column(\"name_primary\"))\n common = pc.utf8_lower(table.column(\"name_common\"))\n name_match = pc.or_(\n pc.equal(primary, name_lower),\n pc.equal(common, name_lower),\n )\n\n filtered = table.filter(name_match)\n\n # Apply qualifiers: each must match country code (2 chars) or region code\n for q in qualifiers:\n country_match = pc.equal(filtered.column(\"country\"), q)\n region_match = pc.equal(filtered.column(\"region\"), q)\n filtered = filtered.filter(pc.or_(country_match, region_match))\n\n if filtered.num_rows == 0:\n return []\n\n # Sort: admin_level desc (innermost first) then population desc\n sort_indices = pc.sort_indices(\n filtered,\n sort_keys=[(\"admin_level\", \"descending\"), (\"population\", \"descending\")],\n )\n filtered = filtered.take(sort_indices)\n\n rows = filtered.to_pylist()\n return [\n Division(\n id=r[\"id\"],\n name=r[\"name_primary\"],\n subtype=r[\"subtype\"],\n country=r[\"country\"],\n region=r[\"region\"],\n admin_level=r[\"admin_level\"],\n population=r[\"population\"],\n parent_division_id=r[\"parent_division_id\"],\n bbox=(r[\"bbox_xmin\"], r[\"bbox_ymin\"], r[\"bbox_xmax\"], r[\"bbox_ymax\"]),\n )\n for r in rows\n ]\n\n\ndef best_match(query: str) -> Division:\n \"\"\"Return the single best match for the query. Raises LookupError on no match.\"\"\"\n results = resolve(query)\n if not results:\n raise LookupError(f\"No division found for {query!r}\")\n return results[0]\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_geocoding.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/geocoding.py tests/test_geocoding.py\ngit commit -m \"Geocoding lookup: name -> Division via the cached index\n\nresolve() returns ranked matches sorted by admin_level desc then\npopulation desc. best_match() is the single-result convenience wrapper.\nComma-suffix tokens narrow by country or region code.\"\n```\n\n---\n\n## Task 1.7: Wire `--in` and `--where` into `download`\n\nExtend the existing `download` command. No new commands yet \u2014 this is the smallest change that makes the new machinery user-visible.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_cli_download.py`\n\n- [ ] **Step 1: Write failing tests**\n\nAppend to `tests/test_cli_download.py`:\n\n```python\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from overturemaps.geocoding import Division\n\n captured = {}\n\n def fake_best_match(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake_best_match)\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_cli_download.py -v -k \"in_flag or rejects_in_and_bbox or with_where\"`\nExpected: all three fail (flag not recognized).\n\n- [ ] **Step 3: Extend `core.record_batch_reader` to accept `where_filters`**\n\nIn `overturemaps/core.py`, update `_prepare_query` and `record_batch_reader` to accept and apply a list of `ParsedFilter`. Find the function `_prepare_query` (around line 228 of the existing file) and change its signature + body:\n\n```python\ndef _prepare_query(\n overture_type,\n bbox=None,\n release=None,\n connect_timeout=None,\n request_timeout=None,\n stac=False,\n where_filters=None,\n):\n \"\"\"Resolve the S3 dataset and filter expression for a given query.\"\"\"\n if release is None:\n release = get_latest_release()\n path = _dataset_path(overture_type, release)\n bbox_obj = _coerce_bbox(bbox)\n\n intersecting_files = None\n if bbox_obj and stac:\n intersecting_files = _get_files_from_stac(\n type_theme_map[overture_type], overture_type, bbox_obj, release\n )\n if intersecting_files is not None and len(intersecting_files) == 0:\n return None\n\n filter_expr = None\n if bbox_obj:\n xmin, ymin, xmax, ymax = bbox_obj.as_tuple()\n filter_expr = (\n (pc.field(\"bbox\", \"xmin\") < xmax)\n & (pc.field(\"bbox\", \"xmax\") > xmin)\n & (pc.field(\"bbox\", \"ymin\") < ymax)\n & (pc.field(\"bbox\", \"ymax\") > ymin)\n )\n\n dataset = ds.dataset(\n intersecting_files if intersecting_files is not None else path,\n filesystem=fs.S3FileSystem(\n anonymous=True,\n region=\"us-west-2\",\n connect_timeout=connect_timeout,\n request_timeout=request_timeout,\n ),\n )\n\n if where_filters:\n from .filters import combine\n attr_expr = combine(list(where_filters), dataset.schema)\n if attr_expr is not None:\n filter_expr = attr_expr if filter_expr is None else filter_expr & attr_expr\n\n return dataset, filter_expr\n```\n\nUpdate `record_batch_reader` and `count_rows` to forward the new kwarg:\n\n```python\ndef count_rows(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n) -> int:\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return 0\n dataset, filter_expr = result\n return dataset.count_rows(filter=filter_expr)\n\n\ndef record_batch_reader(\n overture_type, bbox=None, release=None,\n connect_timeout=None, request_timeout=None, stac=False, where_filters=None,\n):\n result = _prepare_query(\n overture_type, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n if result is None:\n return None\n dataset, filter_expr = result\n return _record_batch_reader_from_dataset(dataset, filter_expr=filter_expr)\n```\n\n- [ ] **Step 4: Extend the `download` Click command**\n\nIn `overturemaps/cli.py`, add this import near the top:\n\n```python\nfrom .filters import parse_where_expr\nfrom .geocoding import best_match\n```\n\nThen modify the `download` decorator block to add the two new options. Locate the existing `def download(...)` (around line 179) and update its decorators and signature:\n\n```python\n@cli.command()\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str,\n help=\"Resolve a place name to a bbox via the divisions index.\")\n@click.option(\"--where\", \"where_exprs\", multiple=True,\n help=\"Attribute filter K OP V (repeatable). Example: --where height>50\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]), required=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release, required=False,\n help=\"Release version (defaults to latest)\")\n@click.option(\"--stac/--no-stac\", required=False, type=bool, is_flag=True, default=True,\n help=\"...existing help text...\")\n@click.option(\"--connect_timeout\", required=False, type=int)\n@click.option(\"--request_timeout\", required=False, type=int)\ndef download(bbox, in_place, where_exprs, output_format, output, type_, release,\n connect_timeout, request_timeout, stac):\n # Mutual exclusion check\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n\n # Resolve --in to bbox\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n click.secho(\n f\"Resolved {in_place!r} -> {division.name} \"\n f\"({division.subtype}, {division.region or division.country}, \"\n f\"pop {division.population})\",\n fg=\"bright_black\", err=True,\n )\n\n # Parse --where expressions\n where_filters = [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n\n # ... existing body, but pass where_filters into record_batch_reader ...\n if bbox is None:\n click.secho(\n \"Warning: No bounding box provided. Downloading the entire dataset \"\n \"for this type. The full Overture dataset is approximately \"\n \"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n else:\n area = _bbox_area_sq_deg(bbox[0], bbox[1], bbox[2], bbox[3])\n fraction = area / EARTH_AREA_SQ_DEG\n if fraction >= LARGE_BBOX_THRESHOLD:\n pct = fraction * 100\n click.secho(\n f\"Warning: The bounding box covers ~{pct:.1f}% of Earth's surface. \"\n f\"This may take a long time and use significant bandwidth. \"\n f\"The full Overture dataset is approximately \"\n f\"1.2 TB as GeoJSON and 400 GB as GeoParquet.\",\n fg=\"yellow\", bold=True, err=True,\n )\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\n \"Output file (-o/--output) is required when using geoparquet format\"\n )\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n type_, bbox, release, connect_timeout, request_timeout, stac,\n where_filters=where_filters,\n )\n\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n\n # ... rest of existing state-saving block unchanged ...\n if output is not None:\n output_path = os.path.abspath(os.path.expanduser(output))\n backend = Backend(output_format)\n theme = type_theme_map.get(type_)\n if theme is None:\n click.secho(f\"Warning: Could not determine theme for type {type_}\",\n fg=\"yellow\", bold=True, err=True)\n return\n state = PipelineState(\n last_release=release, last_run=datetime.now(timezone.utc).isoformat(),\n theme=theme, type=type_,\n bbox=BBox(xmin=bbox[0], ymin=bbox[1], xmax=bbox[2], ymax=bbox[3])\n if bbox is not None else None,\n backend=backend, output=output_path,\n )\n state_path = get_state_path(output)\n save_state(state, state_path)\n click.secho(f\"State saved to {state_path}\", fg=\"bright_black\", err=True)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all unit tests pass, including the three new download tests.\n\n- [ ] **Step 6: Smoke-test against real S3 (optional but recommended)**\n\nRun: `uv run overturemaps download -t building --in \"Boston, MA\" --where height>50 -f geojsonseq -o /tmp/tall.jsonl`\nExpected: progress bar prints to stderr; `/tmp/tall.jsonl` contains one feature per line; each has `properties.height > 50`.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/core.py tests/test_cli_download.py\ngit commit -m \"Wire --in and --where into the download command\n\n--in resolves a place name via the divisions index and feeds the bbox\ninto the existing pipeline. --where (repeatable) parses K OP V filters\nwhich are validated against the type schema and pushed down to PyArrow.\nMutual exclusion enforced between --in and --bbox.\"\n```\n\n---\n\n## Task 1.8: End-of-phase sanity check\n\n- [ ] **Step 1: Run the full unit test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all tests pass with no regressions in the existing download/gers/releases/changelog suites.\n\n- [ ] **Step 2: Run an integration smoke**\n\nRun: `uv run pytest tests/test_cache_integration.py -m integration -v`\nExpected: PASS.\n\n- [ ] **Step 3: Verify the `--help` output still renders cleanly**\n\nRun: `uv run overturemaps download --help`\nExpected: shows `--in` and `--where` alongside the existing options.\n\n- [ ] **Step 4: Commit anything pending**\n\n```bash\ngit status\n# If only the commits from previous tasks are present, no action needed.\n```\n\n\ud83d\udea6 **Phase 1 ship gate:** the download command now accepts place names and attribute filters. This is a valid release boundary if you want to ship before continuing.\n\n---\n\n# Phase 2 \u2014 Metadata Commands + JSON\n\nEnd state: agents can discover every queryable shape (`themes`, `types`, `schema`, `categories`, `capabilities`), preview every query (`count`, `sample`), resolve any place name (`where`), and manage the cache (`cache info|clear|build`). All metadata commands emit JSON when the global `--json` flag is set.\n\n---\n\n## Task 2.1: Global `--json` flag\n\nA top-level flag on the `cli` group, accessible via Click context.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_json.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_json.py`:\n\n```python\n\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: FAIL \u2014 flag not yet defined; click prints \"No such option: --json\".\n\n- [ ] **Step 3: Add the flag**\n\nIn `overturemaps/cli.py`, modify the existing `@click.group(...)` block to add the flag and a `pass_context` decorator. Find:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.pass_context\ndef cli(ctx):\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\nReplace with:\n\n```python\n@click.group(invoke_without_command=True)\n@click.version_option(\n version=importlib.metadata.version(\"overturemaps\"),\n prog_name=\"overturemaps\",\n)\n@click.option(\"--json\", \"json_output\", is_flag=True, default=False,\n help=\"Emit machine-readable JSON for metadata commands.\")\n@click.pass_context\ndef cli(ctx, json_output):\n ctx.ensure_object(dict)\n ctx.obj[\"json\"] = json_output\n if ctx.invoked_subcommand is None:\n _print_banner()\n click.echo(ctx.get_help())\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_json.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_json.py\ngit commit -m \"Add global --json flag\n\nTop-level boolean stored on Click context. Metadata commands added in\nsubsequent tasks consult ctx.obj['json'] to switch output mode.\"\n```\n\n---\n\n## Task 2.2: `where` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_where.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_where.py`:\n\n```python\n\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake(query):\n captured[\"query\"] = query\n return Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )\n\n def fake_resolve(query):\n return [fake(query)]\n\n monkeypatch.setattr(\"overturemaps.cli.best_match\", fake)\n monkeypatch.setattr(\"overturemaps.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: (_ for _ in ()).throw(LookupError(f\"No match for {q!r}\")),\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n # JSON error is printed to stderr by Click's invoke (mixed in result.output by default)\n # Confirm an error structure was emitted somewhere.\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n # When mix_stderr=True (default), stderr is part of output.\n assert \"no_match\" in combined or \"No match\" in combined\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: FAIL \u2014 `where` command doesn't exist.\n\n- [ ] **Step 3: Add a JSON helper, then the command**\n\nNear the top of `overturemaps/cli.py`, add an `orjson`-based emit helper after the existing imports:\n\n```python\nimport orjson\n\nfrom .geocoding import best_match, resolve\n\n\ndef _emit_json(ctx, payload, file=None):\n \"\"\"Print one JSON document to stdout.\"\"\"\n out = orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode()\n click.echo(out, file=file)\n\n\ndef _emit_error_json(message, code=\"error\"):\n \"\"\"Print a JSON error envelope to stderr.\"\"\"\n err = {\"error\": {\"code\": code, \"message\": message}}\n click.echo(orjson.dumps(err).decode(), err=True)\n```\n\nThen add the `where` command (after the existing `download` definition):\n\n```python\n@cli.command()\n@click.argument(\"query\", type=str)\n@click.pass_context\ndef where(ctx, query):\n \"\"\"Resolve a place name to an Overture division feature.\"\"\"\n json_mode = ctx.obj.get(\"json\", False)\n try:\n pick = best_match(query)\n except LookupError as e:\n if json_mode:\n _emit_error_json(str(e), code=\"no_match\")\n else:\n click.secho(str(e), fg=\"red\", err=True)\n ctx.exit(1)\n\n if json_mode:\n all_matches = resolve(query)\n payload = pick.as_dict()\n payload[\"candidates\"] = [d.as_dict() for d in all_matches]\n _emit_json(ctx, payload)\n return\n\n # Human output\n region_or_country = pick.region or pick.country or \"?\"\n click.secho(f\"{pick.name}, {region_or_country}\", bold=True)\n click.echo(f\" subtype: {pick.subtype}\")\n click.echo(f\" bbox: {pick.bbox[0]:.4f}, {pick.bbox[1]:.4f}, \"\n f\"{pick.bbox[2]:.4f}, {pick.bbox[3]:.4f}\")\n if pick.population is not None:\n click.echo(f\" population: {pick.population:,}\")\n click.echo(f\" id: {pick.id}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_where.py -v`\nExpected: all 4 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_where.py\ngit commit -m \"Add `where` command for place-name geocoding\n\nReturns the best-match division as human text or JSON. JSON mode\nincludes a `candidates` array of all matches sorted by quality.\"\n```\n\n---\n\n## Task 2.3: `count` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_count.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_count.py`:\n\n```python\n\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n ),\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"overturemaps.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: FAIL \u2014 `count` command doesn't exist.\n\n- [ ] **Step 3: Add `count` to cli.py**\n\nAdd this import at the top of `overturemaps/cli.py` (alongside the existing core imports):\n\n```python\nfrom .core import count_rows\n```\n\nThen add the command (after `where`):\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef count(ctx, type_, bbox, in_place, where_exprs, release):\n \"\"\"Count features for a query without downloading them.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n n = count_rows(\n type_, bbox=bbox, release=release, where_filters=where_filters,\n )\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, {\n \"type\": type_,\n \"bbox\": bbox,\n \"where\": [f\"{f.key}{f.op}{f.value}\" for f in (where_filters or [])],\n \"release\": release,\n \"count\": n,\n })\n else:\n click.echo(f\"{n:,}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_count.py -v`\nExpected: all 3 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_count.py\ngit commit -m \"Add `count` command for cheap query previews\n\ncount -t TYPE [--in|--bbox] [--where ...] returns the row count without\nstreaming data. Human output is the integer; JSON output includes the\nquery echo.\"\n```\n\n---\n\n## Task 2.4: `sample` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_sample.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_sample.py`:\n\n```python\n\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([(\"id\", pa.string()), (\"name\", pa.string())])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\"} for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: FAIL \u2014 `sample` command doesn't exist.\n\n- [ ] **Step 3: Add a helper that wraps the reader with a row limit, then the command**\n\nIn `overturemaps/cli.py`, add a small helper near the existing copy import:\n\n```python\ndef _limit_reader(reader, n):\n \"\"\"Yield a new RecordBatchReader emitting at most `n` rows.\"\"\"\n import pyarrow as pa\n\n def _batches():\n remaining = n\n while remaining > 0:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n return\n if batch.num_rows == 0:\n continue\n if batch.num_rows > remaining:\n batch = batch.slice(0, remaining)\n remaining -= batch.num_rows\n yield batch\n\n return pa.RecordBatchReader.from_batches(reader.schema, _batches())\n```\n\nAdd the command:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-n\", default=10, show_default=True, type=int,\n help=\"Maximum number of features to emit.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef sample(type_, bbox, in_place, where_exprs, n, output_format, output, release):\n \"\"\"Emit the first N features matching the query.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n where_filters = (\n [parse_where_expr(e) for e in where_exprs] if where_exprs else None\n )\n\n reader = record_batch_reader(\n type_, bbox, release, None, None, True,\n where_filters=where_filters,\n )\n if reader is None:\n return\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n limited = _limit_reader(reader, n)\n\n with get_writer(output_format, output_file, schema=limited.schema) as writer:\n copy(limited, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_sample.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_sample.py\ngit commit -m \"Add `sample` command for fixed-N previews\n\nStreams at most N features through the existing writer pipeline.\nDefault format is geojsonseq for line-streamable output.\"\n```\n\n---\n\n## Task 2.5: Introspection module (themes + types)\n\n`themes` and `types` are static data on Overture's schema. Put the catalog in a new module so other commands can reuse it.\n\n**Files:**\n- Create: `overturemaps/introspection.py`\n- Create: `tests/test_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection module.\"\"\"\n\nimport pytest\n\nfrom overturemaps.introspection import (\n list_themes,\n list_types,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: `ModuleNotFoundError: No module named 'overturemaps.introspection'`.\n\n- [ ] **Step 3: Implement the catalog**\n\nCreate `overturemaps/introspection.py`:\n\n```python\n\"\"\"Static catalog of Overture themes and types, plus runtime schema helpers.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional\n\nfrom .core import type_theme_map, get_all_overture_types\n\n\nTHEME_DESCRIPTIONS: dict[str, str] = {\n \"addresses\": \"Address features with street, number, postcode, and country.\",\n \"base\": \"Base layers: land, water, land use/cover, infrastructure, bathymetry.\",\n \"buildings\": \"Building footprints with height, floors, class, and roof attributes.\",\n \"divisions\": \"Administrative divisions (countries, regions, counties, localities) and their polygons.\",\n \"places\": \"Categorized point features for businesses, services, and amenities (POIs).\",\n \"transportation\": \"Road network as segments with class, surface, speed limits, and connector junctions.\",\n}\n\n\nTYPE_DESCRIPTIONS: dict[str, str] = {\n \"address\": \"Address point with street, number, postcode, country code.\",\n \"bathymetry\": \"Underwater terrain features.\",\n \"building\": \"Building footprint with height, floor count, class, subtype.\",\n \"building_part\": \"Sub-component of a building when it has variable height/material.\",\n \"division\": \"Point representation of an administrative division (country, region, locality...).\",\n \"division_area\": \"Polygon area for a division.\",\n \"division_boundary\": \"Linear boundary between divisions.\",\n \"place\": \"Categorized POI with names, brand, categories, contact info.\",\n \"segment\": \"Road or rail segment with class, subclass, surface, speed limits.\",\n \"connector\": \"Junction or endpoint where segments meet.\",\n \"infrastructure\": \"Linear or point infrastructure features (bridges, tunnels, towers, etc.).\",\n \"land\": \"Natural land features (forest, beach, glacier, etc.).\",\n \"land_cover\": \"Land cover surface (forest, grassland, water, etc.).\",\n \"land_use\": \"Predominant human use of an area (commercial, residential, recreation, etc.).\",\n \"water\": \"Water bodies (river, lake, ocean).\",\n}\n\n\ndef list_themes() -> List[dict]:\n \"\"\"List the six themes with descriptions and member types.\"\"\"\n out = []\n for theme in sorted(THEME_DESCRIPTIONS.keys()):\n members = sorted(t for t, th in type_theme_map.items() if th == theme)\n out.append({\n \"name\": theme,\n \"description\": THEME_DESCRIPTIONS[theme],\n \"types\": members,\n })\n return out\n\n\ndef list_types(theme: Optional[str] = None) -> List[dict]:\n \"\"\"List all types, optionally filtered to a single theme.\"\"\"\n if theme is not None and theme not in THEME_DESCRIPTIONS:\n raise ValueError(\n f\"Unknown theme {theme!r}. Available: \"\n f\"{', '.join(sorted(THEME_DESCRIPTIONS.keys()))}\"\n )\n out = []\n for type_name in sorted(get_all_overture_types()):\n type_theme = type_theme_map[type_name]\n if theme is not None and type_theme != theme:\n continue\n out.append({\n \"name\": type_name,\n \"theme\": type_theme,\n \"description\": TYPE_DESCRIPTIONS.get(type_name, \"\"),\n })\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all 6 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/introspection.py tests/test_introspection.py\ngit commit -m \"Add introspection catalog of themes and types\n\nStatic module so themes/types commands and the capabilities manifest can\nshare one source of truth for descriptions.\"\n```\n\n---\n\n## Task 2.6: `themes` and `types` commands\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_introspection.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_introspection.py`:\n\n```python\n\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: FAIL \u2014 commands don't exist.\n\n- [ ] **Step 3: Add the commands**\n\nIn `overturemaps/cli.py`, add the import:\n\n```python\nfrom .introspection import list_themes, list_types\n```\n\nAdd the commands:\n\n```python\n@cli.command()\n@click.pass_context\ndef themes(ctx):\n \"\"\"List the six Overture themes.\"\"\"\n data = list_themes()\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" {t['description']}\")\n click.echo(f\" types: {', '.join(t['types'])}\")\n click.echo()\n\n\n@cli.command()\n@click.option(\"--theme\", required=False, type=str,\n help=\"Filter to types belonging to this theme.\")\n@click.pass_context\ndef types(ctx, theme):\n \"\"\"List Overture feature types.\"\"\"\n try:\n data = list_types(theme=theme)\n except ValueError as e:\n raise click.UsageError(str(e))\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n for t in data:\n click.secho(t[\"name\"], bold=True, fg=\"cyan\")\n click.echo(f\" theme: {t['theme']}\")\n click.echo(f\" {t['description']}\")\n click.echo()\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_introspection.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_introspection.py\ngit commit -m \"Add `themes` and `types` introspection commands\"\n```\n\n---\n\n## Task 2.7: `schema` command\n\nEmits the PyArrow schema of a type plus one sample feature.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Modify: `tests/test_introspection.py`\n- Create: `tests/test_cli_schema.py`\n\n- [ ] **Step 1: Write the failing test for the helper**\n\nAppend to `tests/test_introspection.py`:\n\n```python\ndef test_flatten_schema_top_level():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n import pyarrow as pa\n from overturemaps.introspection import flatten_schema\n\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_introspection.py -v -k flatten`\nExpected: FAIL \u2014 `flatten_schema` doesn't exist.\n\n- [ ] **Step 3: Implement the helper**\n\nAppend to `overturemaps/introspection.py`:\n\n```python\nimport pyarrow as pa\n\n\ndef flatten_schema(schema: pa.Schema) -> List[dict]:\n \"\"\"Flatten a (possibly nested) Arrow schema into a list of dotted field rows.\n\n Each row is {\"name\": \"categories.primary\", \"type\": \"string\"}.\n \"\"\"\n out: List[dict] = []\n\n def _walk(prefix: str, type_):\n if pa.types.is_struct(type_):\n for i in range(type_.num_fields):\n child = type_.field(i)\n _walk(f\"{prefix}.{child.name}\" if prefix else child.name, child.type)\n elif pa.types.is_list(type_) or pa.types.is_large_list(type_):\n out.append({\"name\": prefix, \"type\": str(type_)})\n else:\n out.append({\"name\": prefix, \"type\": str(type_)})\n\n for field in schema:\n _walk(field.name, field.type)\n return out\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_introspection.py -v`\nExpected: all tests pass.\n\n- [ ] **Step 5: Write the CLI test**\n\nCreate `tests/test_cli_schema.py`:\n\n```python\n\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n```\n\n- [ ] **Step 6: Run test to verify it fails, then add the command**\n\nRun: `uv run pytest tests/test_cli_schema.py -v`\nExpected: FAIL \u2014 `schema` command doesn't exist.\n\nAdd to `overturemaps/cli.py`:\n\n```python\nfrom .introspection import flatten_schema\n```\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), required=True)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef schema(ctx, type_, release):\n \"\"\"Show the schema and a sample feature for an Overture type.\n\n Uses a tiny bbox over a known-populated area to keep this fast.\n \"\"\"\n # A bbox over Manhattan, NYC \u2014 densely populated for any type.\n sample_bbox = [-74.020, 40.700, -73.930, 40.800]\n reader = record_batch_reader(\n type_, sample_bbox, release, None, None, True,\n )\n if reader is None:\n raise click.ClickException(f\"No features available for type {type_!r}\")\n\n sample = None\n try:\n batch = reader.read_next_batch()\n if batch.num_rows > 0:\n sample = batch.slice(0, 1).to_pylist()[0]\n except StopIteration:\n pass\n\n fields = flatten_schema(reader.schema)\n payload = {\n \"type\": type_,\n \"fields\": fields,\n \"example\": sample,\n }\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n\n click.secho(f\"Schema for type {type_!r}\", bold=True)\n for f in fields:\n click.echo(f\" {f['name']}: {f['type']}\")\n click.echo()\n if sample is not None:\n click.secho(\"Example feature:\", bold=True)\n click.echo(orjson.dumps(sample, option=orjson.OPT_INDENT_2).decode())\n```\n\n- [ ] **Step 7: Run tests to verify**\n\nRun: `uv run pytest tests/test_cli_schema.py tests/test_introspection.py -v`\nExpected: PASS.\n\n- [ ] **Step 8: Commit**\n\n```bash\ngit add overturemaps/cli.py overturemaps/introspection.py \\\n tests/test_cli_schema.py tests/test_introspection.py\ngit commit -m \"Add `schema` command emitting flat field list and sample feature\"\n```\n\n---\n\n## Task 2.8: `categories` command\n\nEnumerates `categories.primary` values for `place`. Optional `--in` scope and `--top N`.\n\n**Files:**\n- Modify: `overturemaps/introspection.py`\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_categories.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_categories.py`:\n\n```python\n\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: FAIL \u2014 `categories` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\n@cli.command()\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice([\"place\"]), default=\"place\", show_default=True,\n help=\"Currently only `place` is supported.\")\n@click.option(\"--bbox\", required=False, type=BboxParamType())\n@click.option(\"--in\", \"in_place\", required=False, type=str)\n@click.option(\"--top\", default=20, show_default=True, type=int)\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\n@click.pass_context\ndef categories(ctx, type_, bbox, in_place, top, release):\n \"\"\"Enumerate `categories.primary` values, sorted by count desc.\"\"\"\n if bbox is not None and in_place is not None:\n raise click.UsageError(\"--bbox and --in are mutually exclusive\")\n if in_place is not None:\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n if bbox is None:\n raise click.UsageError(\"Provide --bbox or --in; global enumeration is too costly.\")\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, [])\n return\n\n import pyarrow.compute as pc\n\n counts: dict[str, int] = {}\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n cat_col = batch.column(\"categories\").combine_chunks()\n primary = pc.struct_field(cat_col, \"primary\")\n for item in pc.value_counts(primary).to_pylist():\n val = item[\"values\"]\n if val is None:\n continue\n counts[val] = counts.get(val, 0) + item[\"counts\"]\n\n ranked = sorted(counts.items(), key=lambda kv: kv[1], reverse=True)[:top]\n payload = [{\"value\": v, \"count\": c} for v, c in ranked]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n click.echo(f\" {row['count']:>8,} {row['value']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_categories.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_categories.py\ngit commit -m \"Add `categories` command enumerating place taxonomy\n\nScoped via --in or --bbox; returns top-N values by count. Global\nenumeration is rejected to avoid full-scan cost.\"\n```\n\n---\n\n## Task 2.9: `capabilities` command\n\nIntrospects the Click app and emits a JSON manifest.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_capabilities.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_capabilities.py`:\n\n```python\n\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type\" in param_names or \"type_\" in param_names\n assert \"bbox\" in param_names\n assert \"in\" in param_names or \"in_place\" in param_names\n assert \"where\" in param_names or \"where_exprs\" in param_names\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: FAIL \u2014 `capabilities` command doesn't exist.\n\n- [ ] **Step 3: Implement the introspector**\n\nAdd to `overturemaps/cli.py`:\n\n```python\nimport importlib.metadata as _ilm\n\n\ndef _describe_param(param: click.Parameter) -> dict:\n \"\"\"Convert a Click parameter to a JSON-friendly description.\"\"\"\n out: dict = {\n \"name\": param.name,\n \"required\": getattr(param, \"required\", False),\n }\n if isinstance(param, click.Option):\n out[\"flags\"] = list(param.opts)\n out[\"help\"] = param.help or \"\"\n out[\"multiple\"] = param.multiple\n out[\"is_flag\"] = param.is_flag\n if param.default is not None and param.default is not False:\n try:\n out[\"default\"] = param.default\n except Exception:\n pass\n if isinstance(param.type, click.Choice):\n out[\"choices\"] = list(param.type.choices)\n return out\n\n\ndef _describe_command(name: str, command: click.Command) -> dict:\n return {\n \"name\": name,\n \"help\": command.help or command.short_help or \"\",\n \"params\": [_describe_param(p) for p in command.params],\n }\n\n\ndef _walk_group(group: click.Group, prefix: str = \"\") -> list[dict]:\n out: list[dict] = []\n for name, cmd in group.commands.items():\n full = f\"{prefix}{name}\" if not prefix else f\"{prefix} {name}\"\n if isinstance(cmd, click.Group):\n out.extend(_walk_group(cmd, prefix=full))\n else:\n out.append(_describe_command(full, cmd))\n return out\n\n\n@cli.command()\n@click.pass_context\ndef capabilities(ctx):\n \"\"\"Emit a machine-readable manifest of all subcommands.\"\"\"\n payload = {\n \"version\": _ilm.version(\"overturemaps\"),\n \"commands\": _walk_group(cli),\n }\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n # Human mode just prints command names.\n for c in payload[\"commands\"]:\n click.secho(c[\"name\"], bold=True)\n if c[\"help\"]:\n click.echo(f\" {c['help']}\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_capabilities.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_capabilities.py\ngit commit -m \"Add `capabilities` command \u2014 JSON manifest of subcommands\n\nWalks the Click group tree, describing each command's params (flags,\nhelp, defaults, choices) so agents can auto-discover the CLI surface.\"\n```\n\n---\n\n## Task 2.10: `cache` command group\n\n`cache info`, `cache clear`, `cache build`.\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_cache.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_cache.py`:\n\n```python\n\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from overturemaps.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from overturemaps.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"overturemaps.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: FAIL \u2014 `cache` command group doesn't exist.\n\n- [ ] **Step 3: Add the command group**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .cache import cache_info, clear_cache, build_index, index_path\n\n\n@cli.group()\ndef cache():\n \"\"\"Manage the on-disk divisions index.\"\"\"\n pass\n\n\n@cache.command(\"info\")\n@click.pass_context\ndef cache_info_cmd(ctx):\n \"\"\"Show cache location, current release, and up-to-date status.\"\"\"\n latest = get_latest_release()\n data = cache_info(latest_release=latest)\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, data)\n return\n click.echo(f\"Cache path: {data['index_path']}\")\n click.echo(f\"Cached release: {data['index_release'] or '(none)'}\")\n click.echo(f\"Latest release: {data['latest_release']}\")\n click.echo(f\"Up to date: {data['up_to_date']}\")\n click.echo(f\"Size: {data['size_bytes']:,} bytes\")\n\n\n@cache.command(\"clear\")\ndef cache_clear_cmd():\n \"\"\"Remove all divisions-index files from the cache.\"\"\"\n n = clear_cache()\n click.echo(f\"Removed {n} cache file(s).\")\n\n\n@cache.command(\"build\")\ndef cache_build_cmd():\n \"\"\"Force a rebuild of the divisions index against the latest release.\"\"\"\n release = get_latest_release()\n click.secho(f\"Building divisions index for release {release}...\",\n fg=\"bright_black\", err=True)\n p = build_index(release)\n click.secho(f\"Wrote {p}\", fg=\"green\", err=True)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_cache.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_cache.py\ngit commit -m \"Add `cache info|clear|build` command group\"\n```\n\n---\n\n## Phase 2 ship gate\n\n- [ ] Run: `uv run pytest tests/ -m \"not integration\" -v` \u2192 all pass.\n- [ ] Run: `uv run overturemaps --json capabilities | jq '.commands[].name'` (if `jq` available) \u2014 should list all commands.\n- [ ] Run: `uv run overturemaps where \"Boston, MA\"` and verify human + JSON modes.\n\n\ud83d\udea6 **Phase 2 ship gate:** every metadata command is JSON-discoverable. Agents can introspect the CLI without docs.\n\n---\n\n# Phase 3 \u2014 Intent Verbs\n\nFive thin commands: `places`, `buildings`, `roads`, `at`, `containing`. Each is sugar over the existing pipeline.\n\n---\n\n## Task 3.1: `intents.py` shared helpers\n\nHelpers: bbox-from-point-with-radius (meters \u2192 degrees), haversine distance, common-options decorator.\n\n**Files:**\n- Create: `overturemaps/intents.py`\n- Create: `tests/test_intents.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_intents.py`:\n\n```python\n\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom overturemaps.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(0.0, 60.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement**\n\nCreate `overturemaps/intents.py`:\n\n```python\n\"\"\"Shared helpers for the intent verbs (places, buildings, roads, at, containing).\"\"\"\n\nfrom __future__ import annotations\n\nimport math\n\n# Meters per degree at the equator.\n_M_PER_DEG = 111_320.0\n\n\ndef bbox_around_point(\n lat: float, lon: float, radius_meters: float\n) -> tuple[float, float, float, float]:\n \"\"\"Return (xmin, ymin, xmax, ymax) for a bbox around a point.\n\n Note: caller passes lat then lon (geographic convention) but bbox is\n returned in lon/lat order to match the rest of the codebase.\n \"\"\"\n dlat = radius_meters / _M_PER_DEG\n cos_lat = max(math.cos(math.radians(lat)), 1e-6)\n dlon = radius_meters / (_M_PER_DEG * cos_lat)\n return (lon - dlon, lat - dlat, lon + dlon, lat + dlat)\n\n\ndef haversine_meters(lat1: float, lon1: float, lat2: float, lon2: float) -> float:\n \"\"\"Great-circle distance between two lat/lon points in meters.\"\"\"\n R = 6_371_000 # mean Earth radius in meters\n phi1, phi2 = math.radians(lat1), math.radians(lat2)\n dphi = math.radians(lat2 - lat1)\n dlam = math.radians(lon2 - lon1)\n a = math.sin(dphi / 2) ** 2 + math.cos(phi1) * math.cos(phi2) * math.sin(dlam / 2) ** 2\n return 2 * R * math.asin(math.sqrt(a))\n\n\nDEFAULT_RADIUS_BY_TYPE = {\n \"place\": 100,\n \"building\": 50,\n \"address\": 25,\n}\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_intents.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/intents.py tests/test_intents.py\ngit commit -m \"Add intents.py helpers: bbox_around_point, haversine_meters\n\nPlus DEFAULT_RADIUS_BY_TYPE for `at`. Used by the intent verbs in\nsubsequent tasks.\"\n```\n\n---\n\n## Task 3.2: `places` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_places.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_places.py`:\n\n```python\n\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"overturemaps.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom .filters import ParsedFilter\n\n\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--category\", required=False, type=str,\n help=\"Shortcut for --where categories.primary=VAL\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef places(in_place, category, where_exprs, output_format, output, release):\n \"\"\"Download POIs in a named place. Filter by --category for common asks.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if category is not None:\n filters.append(ParsedFilter(\n key=\"categories.primary\", op=\"=\", value=category,\n ))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"place\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_places.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_places.py\ngit commit -m \"Add `places` intent verb\n\n--in resolves to bbox; --category desugars to where categories.primary=VAL;\n--where is additionally available for advanced filters.\"\n```\n\n---\n\n## Task 3.3: `buildings` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_buildings.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_buildings.py`:\n\n```python\n\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef buildings(in_place, where_exprs, output_format, output, release):\n \"\"\"Download buildings in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n filters = [parse_where_expr(e) for e in where_exprs] or None\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"building\", bbox, release, None, None, True, where_filters=filters,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_buildings.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_buildings.py\ngit commit -m \"Add `buildings` intent verb\"\n```\n\n---\n\n## Task 3.4: `roads` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_intents_roads.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_intents_roads.py`:\n\n```python\n\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\nfrom overturemaps.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"overturemaps.cli.best_match\",\n lambda q: Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n ),\n )\n monkeypatch.setattr(\"overturemaps.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"overturemaps.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\nNote: Click reserves `class` as a Python keyword and won't bind to a `class` parameter directly. Use `road_class` as the Python variable and `--class` as the flag.\n\n```python\n@cli.command()\n@click.option(\"--in\", \"in_place\", required=True, type=str)\n@click.option(\"--class\", \"road_class\", required=False, type=str,\n help=\"Shortcut for --where class=VAL (e.g. motorway, primary)\")\n@click.option(\"--where\", \"where_exprs\", multiple=True)\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef roads(in_place, road_class, where_exprs, output_format, output, release):\n \"\"\"Download road segments in a named place.\"\"\"\n try:\n division = best_match(in_place)\n except LookupError as e:\n raise click.UsageError(str(e))\n bbox = list(division.bbox)\n\n filters = [parse_where_expr(e) for e in where_exprs]\n if road_class is not None:\n filters.append(ParsedFilter(key=\"class\", op=\"=\", value=road_class))\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n reader = record_batch_reader(\n \"segment\", bbox, release, None, None, True,\n where_filters=filters or None,\n )\n if reader is None:\n return\n with get_writer(output_format, output_file, schema=reader.schema) as writer:\n copy(reader, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_intents_roads.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_intents_roads.py\ngit commit -m \"Add `roads` intent verb (segment, with --class shortcut)\"\n```\n\n---\n\n## Task 3.5: `at` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_at.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_at.py`:\n\n```python\n\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"overturemaps.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: FAIL.\n\n- [ ] **Step 3: Add the command**\n\n```python\nfrom .intents import bbox_around_point, haversine_meters, DEFAULT_RADIUS_BY_TYPE\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.option(\"-t\", \"--type\", \"type_\",\n type=click.Choice(get_all_overture_types()), default=\"place\",\n show_default=True)\n@click.option(\"-n\", default=10, show_default=True, type=int)\n@click.option(\"--radius\", type=int, required=False,\n help=\"Radius in meters; defaults per type.\")\n@click.option(\"-f\", \"output_format\",\n type=click.Choice([\"geojson\", \"geojsonseq\", \"geoparquet\"]),\n default=\"geojsonseq\", show_default=True)\n@click.option(\"-o\", \"--output\", required=False, type=click.Path())\n@click.option(\"-r\", \"--release\", default=None, callback=validate_release,\n required=False)\ndef at(latlon, type_, n, radius, output_format, output, release):\n \"\"\"Nearest-neighbor lookup. LATLON is 'LAT,LON' (lat first, geographic).\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n if radius is None:\n radius = DEFAULT_RADIUS_BY_TYPE.get(type_, 100)\n bbox = list(bbox_around_point(lat, lon, radius))\n\n reader = record_batch_reader(type_, bbox, release, None, None, True)\n if reader is None:\n return\n\n # Collect all matching features, compute distance, sort, keep top N.\n import shapely.wkb\n import pyarrow as pa\n\n rows: list[tuple[float, dict, bytes]] = []\n while True:\n try:\n batch = reader.read_next_batch()\n except StopIteration:\n break\n if batch.num_rows == 0:\n continue\n geom_blobs = batch.column(\"geometry\").to_pylist()\n prop_cols = [c for c in batch.schema.names if c not in (\"geometry\", \"bbox\")]\n prop_rows = batch.select(prop_cols).to_pylist()\n for blob, prop in zip(geom_blobs, prop_rows):\n try:\n geom = shapely.wkb.loads(blob)\n centroid = geom.centroid\n d = haversine_meters(lat, lon, centroid.y, centroid.x)\n except Exception:\n continue\n rows.append((d, prop, blob))\n\n rows.sort(key=lambda x: x[0])\n rows = rows[:n]\n\n if output_format == \"geoparquet\" and output is None:\n raise click.UsageError(\"Output file (-o/--output) is required for geoparquet\")\n output_file = sys.stdout if output is None else output\n\n # Build a fresh reader over the kept rows and stream through the writer.\n if not rows:\n return\n\n sample_batch_props = [r[1] for r in rows]\n sample_batch_geoms = [r[2] for r in rows]\n new_schema = pa.schema(\n [(name, reader.schema.field(name).type) for name in reader.schema.names]\n )\n\n # Build one batch carrying back properties + geometry; rely on existing writer.\n out_rows = []\n for prop, blob in zip(sample_batch_props, sample_batch_geoms):\n row = dict(prop)\n row[\"geometry\"] = blob\n out_rows.append(row)\n batch = pa.RecordBatch.from_pylist(out_rows, schema=new_schema)\n one_shot = pa.RecordBatchReader.from_batches(new_schema, iter([batch]))\n\n with get_writer(output_format, output_file, schema=new_schema) as writer:\n copy(one_shot, writer)\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_at.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_at.py\ngit commit -m \"Add `at LAT,LON` nearest-neighbor command\n\nBuilds a small bbox around the point (per-type default radius), sorts\nmatching features by haversine distance to the centroid, keeps top N.\"\n```\n\n---\n\n## Task 3.6: `containing` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_containing.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_containing.py`:\n\n```python\n\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"name_common\": [None, None, None],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"overturemaps\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"overturemaps.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We don't need real polygon checks for this test; the bbox-only test\n # below verifies the bbox filter logic. The CLI is expected to confirm\n # polygon containment via shapely as well; for now we stub that.\n monkeypatch.setattr(\n \"overturemaps.cli._polygon_contains\",\n lambda division_id, lon, lat: True,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: FAIL \u2014 `containing` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nAdd to `overturemaps/cli.py`:\n\n```python\ndef _polygon_contains(division_id: str, lon: float, lat: float) -> bool:\n \"\"\"True if the division_area polygon for `division_id` contains the point.\n\n Reads the polygon from the `division_area` S3 partition for the latest\n release, on demand. Cached per-process via the module-level dict.\n \"\"\"\n import pyarrow.dataset as ds\n import pyarrow.fs as _fs\n import pyarrow.compute as _pc\n import shapely.wkb\n\n cache = _polygon_contains._cache # type: ignore[attr-defined]\n if division_id in cache:\n poly = cache[division_id]\n else:\n release = get_latest_release()\n path = f\"overturemaps-us-west-2/release/{release}/theme=divisions/type=division_area/\"\n fs = _fs.S3FileSystem(anonymous=True, region=\"us-west-2\")\n dataset = ds.dataset(path, filesystem=fs)\n filter_expr = _pc.field(\"division_id\") == division_id\n table = dataset.to_table(columns=[\"geometry\"], filter=filter_expr)\n if table.num_rows == 0:\n cache[division_id] = None\n return False\n # union the polygons (a division can have multiple division_area rows)\n geoms = [shapely.wkb.loads(b) for b in table.column(\"geometry\").to_pylist()]\n from shapely.ops import unary_union\n poly = unary_union(geoms)\n cache[division_id] = poly\n\n if poly is None:\n return False\n from shapely.geometry import Point\n return poly.contains(Point(lon, lat))\n\n\n_polygon_contains._cache = {} # type: ignore[attr-defined]\n\n\n@cli.command()\n@click.argument(\"latlon\", type=str)\n@click.pass_context\ndef containing(ctx, latlon):\n \"\"\"Which divisions contain this point? Innermost (highest admin_level) first.\"\"\"\n parts = [p.strip() for p in latlon.split(\",\")]\n if len(parts) != 2:\n raise click.UsageError(\"LATLON must be 'LAT,LON'\")\n try:\n lat = float(parts[0])\n lon = float(parts[1])\n except ValueError:\n raise click.UsageError(\"LATLON values must be numeric\")\n\n release = get_latest_release()\n from .cache import ensure_index\n index_p = ensure_index(release)\n table = pq.read_table(index_p)\n\n # bbox-contains-point candidates\n expr = (\n (pc.field(\"bbox_xmin\") <= lon)\n & (pc.field(\"bbox_xmax\") >= lon)\n & (pc.field(\"bbox_ymin\") <= lat)\n & (pc.field(\"bbox_ymax\") >= lat)\n )\n candidates = table.filter(expr).to_pylist()\n\n # Confirm via polygon containment\n matches = [\n c for c in candidates\n if _polygon_contains(c[\"id\"], lon, lat)\n ]\n # Innermost (highest admin_level) first\n matches.sort(key=lambda c: c[\"admin_level\"], reverse=True)\n\n payload = [\n {\n \"id\": c[\"id\"],\n \"name\": c[\"name_primary\"],\n \"subtype\": c[\"subtype\"],\n \"admin_level\": c[\"admin_level\"],\n \"country\": c[\"country\"],\n \"region\": c[\"region\"],\n }\n for c in matches\n ]\n\n if ctx.obj.get(\"json\"):\n _emit_json(ctx, payload)\n return\n for row in payload:\n loc = row[\"region\"] or row[\"country\"] or \"?\"\n click.secho(f\" {row['name']} ({row['subtype']}, {loc})\", fg=\"cyan\")\n```\n\nThe import `pyarrow.parquet as pq` and `pyarrow.compute as pc` are needed at the top of cli.py; add them alongside existing imports if not already present.\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_containing.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_containing.py\ngit commit -m \"Add `containing LAT,LON` command\n\nFilters the divisions index by bbox-contains-point, then confirms via\nshapely polygon containment against division_area features. Returns\ndivisions innermost-first.\"\n```\n\n\ud83d\udea6 **Phase 3 ship gate:** all intent verbs available. Run `uv run pytest tests/ -m \"not integration\" -v` to confirm.\n\n---\n\n# Phase 4 \u2014 Skill Installer\n\n---\n\n## Task 4.1: Author the SKILL.md content\n\nThis is a content task, not a code task. The file becomes both Claude's SKILL.md and (with a wrapper) the AGENTS.md section.\n\n**Files:**\n- Create: `overturemaps/data/skill.md`\n- Modify: `pyproject.toml` (add `data/*.md` to package data)\n\n- [ ] **Step 1: Create the package data directory and skill content**\n\nCreate `overturemaps/data/__init__.py` (empty file to ensure the directory ships):\n\n```python\n```\n\nCreate `overturemaps/data/skill.md`:\n\n````markdown\n---\nname: overturemaps\ndescription: Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: \"how many coffee shops in SoHo\", \"find hospitals in Brooklyn\", \"show tall buildings in Manhattan\", \"what neighborhoods make up Queens\", \"what's the bounding box for Tokyo\".\n---\n\n# Overture Maps CLI\n\nThe `overturemaps` CLI streams open geospatial data (buildings, places, roads,\naddresses, administrative divisions) directly from Overture's public S3 bucket.\nIt is the right tool whenever the user's question implies a place, an area,\nor a kind of feature on the map \u2014 even when they don't use geo terminology.\n\n## When to reach for this CLI\n\nTriggering phrases (illustrative, not exhaustive):\n\n- *\"How many coffee shops are in SoHo?\"* \u2192 `where` + `count -t place --where categories.primary=coffee_shop`\n- *\"Find hospitals in Brooklyn\"* \u2192 `places --in \"Brooklyn\" --category hospital`\n- *\"Show buildings taller than 100m in Manhattan\"* \u2192 `buildings --in \"Manhattan\" --where height>100`\n- *\"What highways run through Texas?\"* \u2192 `roads --in \"Texas, US\" --class motorway`\n- *\"What neighborhood is this address in?\"* \u2192 `containing LAT,LON`\n- *\"What's at 40.7128, -74.0060?\"* \u2192 `at 40.7128,-74.0060`\n- *\"What's the bounding box of Boston?\"* \u2192 `where \"Boston, MA\" --json`\n\nNegative examples (do NOT reach for overturemaps):\n\n- \"Draw a map of the org chart\" \u2014 not geographic\n- \"What's the time in Boston?\" \u2014 geography incidental, no spatial query needed\n- \"Write a regex for postal codes\" \u2014 schema knowledge unrelated to map data\n\n## Self-discovery\n\nIf you forget the surface, run `overturemaps --json capabilities`. It returns\na manifest of every subcommand with its parameters.\n\n## Recipes\n\n### 1. Resolve a place name to a bbox\n```bash\noverturemaps --json where \"Boston, MA\"\n# {\"name\":\"Boston\",\"bbox\":[-71.19,42.23,-70.99,42.40], ...}\n```\n\n### 2. Count before downloading (always check first)\n```bash\noverturemaps --json count -t building --in \"Tokyo\"\n# {\"count\": 8_754_321, ...}\n# That's too many. Add filters or pick a smaller place.\n```\n\n### 3. Sample to confirm shape before committing\n```bash\noverturemaps sample -t place --in \"Boston, MA\" --where categories.primary=restaurant -n 5\n```\n\n### 4. POIs by category\n```bash\noverturemaps places --in \"SoHo, US-NY\" --category cafe \\\n -f geojsonseq -o cafes.jsonl\n```\n\n### 5. Tall buildings\n```bash\noverturemaps buildings --in \"Manhattan\" --where height>150 \\\n -f geojsonseq -o tall.jsonl\n```\n\n### 6. Highways in a state\n```bash\noverturemaps roads --in \"Texas, US\" --class motorway \\\n -f geojsonseq -o tx_highways.jsonl\n```\n\n### 7. What's near a point\n```bash\noverturemaps at 40.7484,-73.9857 -t place -n 10\n```\n\n### 8. Which admin areas contain a point\n```bash\noverturemaps --json containing 40.7484,-73.9857\n# [{\"name\":\"New York\",\"subtype\":\"locality\",...}, {\"name\":\"New York\",\"subtype\":\"region\",...}, ...]\n```\n\n### 9. Discover what categories exist in a place\n```bash\noverturemaps --json categories -t place --in \"Brooklyn\" --top 20\n```\n\n### 10. Discover what's queryable on a type\n```bash\noverturemaps --json schema -t building\n# Lists every field name and a sample feature.\n```\n\n### 11. Compose where + download\n```bash\nBBOX=$(overturemaps --json where \"Berlin\" | jq -r '.bbox | join(\",\")')\noverturemaps download -t place --bbox \"$BBOX\" \\\n --where categories.primary=hotel \\\n -f geojsonseq -o berlin_hotels.jsonl\n```\n\n### 12. Cache management\n```bash\noverturemaps --json cache info # is the divisions index current?\noverturemaps cache build # force rebuild against latest release\noverturemaps cache clear # nuke local cache\n```\n\n## Schema cheatsheet\n\n| Type | Theme | Key properties |\n|---|---|---|\n| `place` | places | `categories.primary` (hotel, restaurant, cafe, hospital, ...), `names.primary`, `confidence`, `addresses` |\n| `building` | buildings | `height` (meters), `num_floors`, `class`, `subtype`, `roof_shape` |\n| `segment` | transportation | `class` (motorway, primary, secondary, residential, footway), `subclass`, `surface`, `speed_limits` |\n| `division` | divisions | `subtype` (country, region, county, locality, neighborhood, ...), `admin_level`, `population` |\n| `address` | addresses | `street`, `number`, `postcode`, `country` |\n| `land_use` | base | `class` (commercial, residential, recreation, agriculture, ...) |\n| `water` | base | `class` (ocean, lake, river, ...) |\n\nRun `overturemaps --json schema -t TYPE` for the full field list of any type.\n\n## Filter expression syntax\n\nOperators: `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Keys are dot-paths into the\ntype's schema. Multiple `--where` flags AND together.\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"class in [motorway,primary,trunk]\"\n```\n\n## Anti-patterns\n\n- **Don't download globally.** Always pass `--in` or `--bbox`. Global queries\n download hundreds of GB.\n- **Always `count` before downloading anything large.** If the count is in\n the millions, narrow your filters before committing.\n- **Prefer `--where` over post-filtering.** Filters push down to PyArrow and\n Parquet metadata; post-filtering GeoJSON is wasteful.\n- **Don't invent place names.** If `where` returns no match, the place isn't\n in Overture's divisions. Try a parent (city \u2192 state \u2192 country).\n- **Don't parse human stdout.** Use `--json` for metadata commands. Data\n commands always emit structured GeoJSON / GeoParquet.\n- **Don't ignore the `--in` warning on stderr.** It tells you which Boston\n you actually got. If wrong, narrow with `--in \"Boston, US-MA\"`.\n````\n\n- [ ] **Step 2: Make the file ship with the package**\n\nEdit `pyproject.toml`. Find the existing `[build-system]` block. Add a hatch tool block after the `[project.scripts]` block:\n\n```toml\n[tool.hatch.build.targets.wheel]\npackages = [\"overturemaps\"]\n\n[tool.hatch.build.targets.wheel.force-include]\n\"overturemaps/data\" = \"overturemaps/data\"\n```\n\n(If a `[tool.hatch.*]` block already exists, merge instead of duplicating.)\n\n- [ ] **Step 3: Confirm the file is reachable via importlib.resources**\n\nCreate `tests/test_skill_resource.py`:\n\n```python\n\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"overturemaps\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: overturemaps\" in text\n assert \"When to reach for this CLI\" in text\n```\n\nRun: `uv run pytest tests/test_skill_resource.py -v`\nExpected: PASS in dev install (`uv sync` makes the package importable in-place).\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add overturemaps/data/__init__.py overturemaps/data/skill.md \\\n pyproject.toml tests/test_skill_resource.py\ngit commit -m \"Author the agent Skill content as a package data file\n\nSingle source of truth for both Claude Code's SKILL.md and the\nAGENTS.md section. Includes trigger language, recipe catalog, schema\ncheatsheet, and anti-patterns.\"\n```\n\n---\n\n## Task 4.2: skill_installer.py module\n\nWriters for Claude Code and AGENTS.md targets.\n\n**Files:**\n- Create: `overturemaps/skill_installer.py`\n- Create: `tests/test_skill_installer.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_skill_installer.py`:\n\n```python\n\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom overturemaps.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: overturemaps\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: `ModuleNotFoundError`.\n\n- [ ] **Step 3: Implement the installer**\n\nCreate `overturemaps/skill_installer.py`:\n\n```python\n\"\"\"Install the agent Skill / AGENTS.md content to user-chosen targets.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom importlib import resources\nfrom pathlib import Path\n\n\nAGENTS_START_MARKER = \"\"\nAGENTS_END_MARKER = \"\"\n\n\ndef _skill_content() -> str:\n \"\"\"Return the canonical SKILL.md content shipped with the package.\"\"\"\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef _claude_user_dir() -> Path:\n return Path(os.environ.get(\"HOME\", \"~\")).expanduser() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef _claude_project_dir() -> Path:\n return Path.cwd() / \".claude\" / \"skills\" / \"overturemaps\"\n\n\ndef install_claude_user() -> Path:\n \"\"\"Write the SKILL.md to the user-scope Claude Code skills dir.\"\"\"\n target = _claude_user_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef install_claude_project() -> Path:\n \"\"\"Write the SKILL.md to the project-scope Claude Code skills dir.\"\"\"\n target = _claude_project_dir() / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(_skill_content())\n return target\n\n\ndef _agents_md_section() -> str:\n body = _skill_content()\n # Strip the YAML frontmatter for the AGENTS.md target \u2014 humans there\n # don't need it and it confuses some markdown viewers.\n if body.startswith(\"---\"):\n end = body.find(\"\\n---\", 3)\n if end != -1:\n body = body[end + len(\"\\n---\"):].lstrip(\"\\n\")\n return f\"{AGENTS_START_MARKER}\\n{body}\\n{AGENTS_END_MARKER}\\n\"\n\n\ndef install_agents_md() -> Path:\n \"\"\"Insert or replace the overturemaps section in ./AGENTS.md.\"\"\"\n target = Path.cwd() / \"AGENTS.md\"\n section = _agents_md_section()\n if not target.exists():\n target.write_text(section)\n return target\n\n existing = target.read_text()\n pattern = re.compile(\n re.escape(AGENTS_START_MARKER) + r\".*?\" + re.escape(AGENTS_END_MARKER) + r\"\\n?\",\n re.DOTALL,\n )\n if pattern.search(existing):\n new = pattern.sub(section, existing)\n else:\n sep = \"\" if existing.endswith(\"\\n\") else \"\\n\"\n new = existing + sep + \"\\n\" + section\n target.write_text(new)\n return target\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_skill_installer.py -v`\nExpected: all 5 tests pass.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/skill_installer.py tests/test_skill_installer.py\ngit commit -m \"Add Skill installer writers for Claude Code and AGENTS.md\n\nUser/project Claude scopes write SKILL.md verbatim. AGENTS.md target\ninserts between markers, replacing the marked block on rerun and\nappending if the file exists without markers.\"\n```\n\n---\n\n## Task 4.3: `install-skill` command\n\n**Files:**\n- Modify: `overturemaps/cli.py`\n- Create: `tests/test_cli_install_skill.py`\n\n- [ ] **Step 1: Write the failing test**\n\nCreate `tests/test_cli_install_skill.py`:\n\n```python\n\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\").exists()\n # Project-CWD AGENTS.md (isolated_filesystem changes CWD into a temp dir)\n # We can't easily check the temp dir from here; just verify exit code.\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n```\n\n- [ ] **Step 2: Run test to verify it fails**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: FAIL \u2014 `install-skill` command doesn't exist.\n\n- [ ] **Step 3: Add the command**\n\nIn `overturemaps/cli.py`:\n\n```python\nfrom . import skill_installer\n\n\n_INSTALL_TARGETS = (\"claude-user\", \"claude-project\", \"agents-md\")\n\n\n@cli.command(\"install-skill\")\n@click.option(\"--target\", \"targets\", multiple=True,\n type=click.Choice(_INSTALL_TARGETS),\n help=\"Target to install to. Repeat for multiple. \"\n \"Omit to be prompted.\")\n@click.option(\"--yes\", \"skip_confirm\", is_flag=True, default=False,\n help=\"Skip overwrite confirmations.\")\ndef install_skill_cmd(targets, skip_confirm):\n \"\"\"Install the Overture agent Skill (Claude Code / AGENTS.md).\"\"\"\n if not targets:\n targets = []\n click.echo(\"Where should the Skill be installed?\")\n for t in _INSTALL_TARGETS:\n if click.confirm(f\" Install to {t}?\", default=(t == \"claude-user\")):\n targets.append(t)\n if not targets:\n click.secho(\"No targets selected; nothing to do.\", fg=\"yellow\")\n return\n\n for t in targets:\n if t == \"claude-user\":\n target_path = skill_installer._claude_user_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_user()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"claude-project\":\n target_path = skill_installer._claude_project_dir() / \"SKILL.md\"\n if target_path.exists() and not skip_confirm:\n if not click.confirm(f\"Overwrite {target_path}?\", default=True):\n continue\n p = skill_installer.install_claude_project()\n click.secho(f\"Wrote {p}\", fg=\"green\")\n elif t == \"agents-md\":\n p = skill_installer.install_agents_md()\n click.secho(f\"Updated {p}\", fg=\"green\")\n```\n\n- [ ] **Step 4: Run test to verify it passes**\n\nRun: `uv run pytest tests/test_cli_install_skill.py -v`\nExpected: PASS.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add overturemaps/cli.py tests/test_cli_install_skill.py\ngit commit -m \"Add `install-skill` command\n\nInteractive (Click confirms) or non-interactive (--target ... --yes).\nMulti-select via repeated --target. Confirms overwrites for Claude\ntargets; AGENTS.md is updated in place via the marker block.\"\n```\n\n\ud83d\udea6 **Phase 4 ship gate:** the Skill is installable.\n\n---\n\n# Phase 5 \u2014 Docs and Release\n\n---\n\n## Task 5.0: Integration smoke tests (real S3)\n\nAdd the integration tests required by \u00a712.2 of the spec. These hit real S3, so they're slow and marked accordingly.\n\n**Files:**\n- Create: `tests/test_cli_integration.py`\n\n- [ ] **Step 1: Write the integration tests**\n\nCreate `tests/test_cli_integration.py`:\n\n```python\n\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom overturemaps.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n # Each entry has a value + positive count\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering\n levels = [d[\"admin_level\"] for d in data]\n assert levels == sorted(levels, reverse=True)\n```\n\n- [ ] **Step 2: Run the integration tests**\n\nRun: `uv run pytest tests/test_cli_integration.py -m integration -v`\nExpected: all 5 tests pass. Allow ~1\u20132 minutes \u2014 the first run builds the divisions index.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add tests/test_cli_integration.py\ngit commit -m \"Add integration tests for the new agent-facing commands\n\nCovers where, count, categories, at, containing against real S3 per\nspec \u00a712.2. Marked with pytestmark = pytest.mark.integration so they\nopt out of the default unit-test run.\"\n```\n\n---\n\n## Task 5.1: Update README\n\n**Files:**\n- Modify: `README.md`\n\n- [ ] **Step 1: Add a \"Quick start for agents\" section near the top**\n\nOpen `README.md`. After the existing \"Quick Start\" block (around line 22), insert a new section before the \"Usage\" section:\n\n```markdown\n## Quick Start for Coding Agents\n\nInstall the Skill so an agent can discover this CLI automatically:\n\n```bash\noverturemaps install-skill\n```\n\nSelf-introspect:\n\n```bash\noverturemaps --json capabilities # list every subcommand + parameters\noverturemaps --json themes # list themes\noverturemaps --json types # list types\noverturemaps --json schema -t place # fields + a sample feature\n```\n\nResolve a place, count, then download:\n\n```bash\noverturemaps --json where \"Boston, MA\"\noverturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=restaurant\noverturemaps places --in \"Boston, MA\" --category restaurant -f geojsonseq -o out.jsonl\n```\n```\n\n- [ ] **Step 2: Add a \"New in 1.1.0\" subsection in the Usage section**\n\nAfter the existing `#### download` block, add a new subsection covering the new commands. Keep entries terse \u2014 full reference is in `--help` and `--json capabilities`:\n\n```markdown\n#### `where TEXT`\n\nResolve a place name to a division feature. Returns bbox, subtype, population, hierarchy.\n\n#### `count`, `sample`\n\nCheap previews of any query (`-t TYPE --in PLACE --where FILTER`).\n\n#### `themes`, `types`, `schema`, `categories`, `capabilities`\n\nIntrospect what's queryable. `--json` produces machine-readable output.\n\n#### `places`, `buildings`, `roads`\n\nIntent verbs that wrap `download` with a familiar shape:\n```bash\noverturemaps places --in \"Brooklyn\" --category hospital -f geojsonseq -o out.jsonl\noverturemaps buildings --in \"Manhattan\" --where height>100 -f geojsonseq -o out.jsonl\noverturemaps roads --in \"Texas, US\" --class motorway -f geojsonseq -o out.jsonl\n```\n\n#### `at LAT,LON`, `containing LAT,LON`\n\nPoint queries. `at` is nearest-neighbor; `containing` lists admin divisions\nthat contain the point.\n\n#### `install-skill`\n\nInstall the agent-discoverable Skill for Claude Code and/or write an\n`AGENTS.md` section.\n\n#### `cache info|clear|build`\n\nManage the on-disk divisions index (used by `--in` and `containing`).\n```\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add README.md\ngit commit -m \"Document the new agent-friendly commands in README\"\n```\n\n---\n\n## Task 5.2: Version bump\n\n- [ ] **Step 1: Edit `pyproject.toml`**\n\nChange `version = \"1.0.0\"` to `version = \"1.1.0\"`.\n\n- [ ] **Step 2: Run the full test suite**\n\nRun: `uv run pytest tests/ -m \"not integration\" -v`\nExpected: all pass.\n\n- [ ] **Step 3: Run an integration smoke**\n\nRun: `uv run pytest tests/ -m integration -v`\nExpected: all pass.\n\n- [ ] **Step 4: Manually exercise the new surface**\n\n```bash\nuv run overturemaps install-skill --target claude-user --yes\nuv run overturemaps --json where \"Boston, MA\"\nuv run overturemaps --json count -t place --in \"Boston, MA\" --where categories.primary=cafe\nuv run overturemaps places --in \"Boston, MA\" --category cafe -f geojsonseq -o /tmp/cafes.jsonl\nhead -1 /tmp/cafes.jsonl | jq .properties.categories\n```\n\nVerify each step produces sensible output.\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add pyproject.toml\ngit commit -m \"Bump version to 1.1.0\"\n```\n\n\ud83d\udea6 **Phase 5 ship gate:** ready to tag and release per the project's standard `release` skill.\n\n---\n\n# Appendix: Quick reference for an executor\n\n- **Unit tests:** `uv run pytest tests/ -m \"not integration\" -v`\n- **Integration tests:** `uv run pytest tests/ -m integration -v`\n- **Run one file:** `uv run pytest tests/.py -v`\n- **Run one test:** `uv run pytest tests/.py:: -v`\n- **Manual CLI test:** `uv run overturemaps ...`\n- **Spec reference:** `docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md`\n\nPhase 1 (Tasks 1.1 \u2013 1.8) is the longest and highest-risk phase; pause and verify before continuing into Phase 2. The remaining phases are largely additive surface area on the foundation built in Phase 1.\n", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md": "# Agent-Usability Eval Implementation Plan\n\n> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.\n\n**Goal:** Build an `evals/` harness that runs headless Claude Code against a bank of geospatial questions, captures each agent's CLI trace, scores process failures (unnecessary `download`, CLI errors), and synthesizes concrete improvement proposals.\n\n**Architecture:** Standalone Python scripts under `evals/`. A `runner` drives `claude -p` per (question \u00d7 repeat) inside an isolated working dir with the Overture Skill installed and a logging `PATH` shim first on `$PATH`. Pure modules (`trace`, `taxonomy`, `score`) normalize and score the captured traces and are unit-tested against fixtures. A `synthesize` step aggregates records and asks `claude -p` for ranked, evidence-backed proposals.\n\n**Tech Stack:** Python 3.10+, Click CLI under test, PyYAML for the question bank, `claude` CLI (headless), pytest for the pure modules.\n\n**Spec:** `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`\n\n---\n\n## File Structure\n\n```\nevals/\n __init__.py # marks evals a package so `import evals.*` works in tests\n questions.yaml # the 10-question bank\n shim/overturemaps # executable PATH shim: logs argv/exit/io, runs real CLI\n trace.py # ShimCall/Transcript dataclasses + parsers (pure)\n taxonomy.py # classify_error(call) -> label | None (pure)\n score.py # Record + score_run() + main() (pure scoring + IO)\n runner.py # drives claude -p, writes runs/__r/\n synthesize.py # aggregate records -> report.md + proposals.json\n runs/ # generated per-run artifacts (gitignored)\n report.md # generated\n proposals.json # generated\ntests/\n test_eval_trace.py\n test_eval_taxonomy.py\n test_eval_score.py\n test_eval_shim.py\n eval_fixtures/\n shim_sample.log\n transcript_sample.jsonl\n```\n\n---\n\n### Task 1: Scaffold the `evals` package, deps, and question bank\n\n**Files:**\n- Create: `evals/__init__.py`\n- Create: `evals/questions.yaml`\n- Modify: `pytest.ini` (add `pythonpath = .`)\n- Modify: `.gitignore` (ignore generated eval artifacts)\n\n- [ ] **Step 1: Add PyYAML to the dev dependency group**\n\nRun:\n```bash\nuv add --group dev pyyaml\n```\nExpected: `pyproject.toml` gains `pyyaml` under `[dependency-groups] dev`, lockfile updates.\n\n- [ ] **Step 2: Create the package marker**\n\nCreate `evals/__init__.py`:\n```python\n\"\"\"Agent-usability eval harness for the Overture CLI. See docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md.\"\"\"\n```\n\n- [ ] **Step 3: Make `import evals` work under pytest**\n\nIn `pytest.ini`, add a `pythonpath` line directly under `[pytest]` (after the comment on line 2):\n```ini\n[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n```\n(Leave the rest of the file unchanged.)\n\n- [ ] **Step 4: Ignore generated artifacts**\n\nAppend to `.gitignore`:\n```gitignore\n# Agent-usability eval artifacts\nevals/runs/\nevals/report.md\nevals/proposals.json\n```\n\n- [ ] **Step 5: Write the question bank**\n\nCreate `evals/questions.yaml`:\n```yaml\n# Agent-usability eval question bank.\n# Fields:\n# id stable slug (no '__' \u2014 that delimits run dirs)\n# question the prompt handed verbatim to `claude -p`\n# tier 1..5 complexity tier\n# download_is_legitimate true only when no convenience verb covers the type\n# target_type expected Overture type(s) for the answer\n# place optional; resolved by the cost guard to bound query size\n# notes ideal path (and, for compound, the expected decomposition)\n# subtasks optional; expected verb-by-verb decomposition (compound)\n\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: count -t place --in Brooklyn --category coffee_shop\"\n\n- id: where-boston\n question: \"Where is Boston, MA, and what is its bounding box?\"\n tier: 1\n download_is_legitimate: false\n target_type: division\n place: \"Boston, US-MA\"\n notes: \"Ideal: where 'Boston, MA' (optionally --json for the bbox)\"\n\n- id: tall-buildings-manhattan\n question: \"Find buildings taller than 150m in Manhattan.\"\n tier: 2\n download_is_legitimate: false\n target_type: building\n place: \"Manhattan, US-NY\"\n notes: \"Ideal: buildings --in Manhattan --where 'height>150'\"\n\n- id: restaurant-categories-brooklyn\n question: \"What restaurant categories exist for places in Brooklyn?\"\n tier: 2\n download_is_legitimate: false\n target_type: place\n place: \"Brooklyn, US-NY\"\n notes: \"Ideal: categories -t place --in Brooklyn (then filter to restaurant_* values)\"\n\n- id: pois-near-point\n question: \"What POIs are within 500m of 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: place\n notes: \"Ideal: at 40.7128,-74.0060 -t place --radius 500\"\n\n- id: containing-point\n question: \"Which administrative areas contain the point 40.7128,-74.0060?\"\n tier: 3\n download_is_legitimate: false\n target_type: division\n notes: \"Ideal: containing 40.7128,-74.0060\"\n\n- id: water-downtown-boston\n question: \"Get the water features in downtown Boston.\"\n tier: 4\n download_is_legitimate: true\n target_type: water\n place: \"Boston, US-MA\"\n notes: \"No convenience verb for water; download -t water is correct. Coverage-gap candidate.\"\n\n- id: landuse-brooklyn\n question: \"Get the land-use polygons for a small area of Brooklyn.\"\n tier: 4\n download_is_legitimate: true\n target_type: land_use\n place: \"Brooklyn, US-NY\"\n notes: \"No convenience verb for land_use; download -t land_use is correct. Coverage-gap candidate.\"\n\n- id: hardware-near-bikepaths-alameda\n question: \"Find all the hardware stores within 200m of bike paths in Alameda County.\"\n tier: 5\n download_is_legitimate: false\n target_type: [place, segment]\n place: \"Alameda County, US-CA\"\n notes: \"Both layers have verbs; fetch each and join in code. download -t place/segment is a failure.\"\n subtasks:\n - \"places --in 'Alameda County' --category hardware_store\"\n - \"roads --in 'Alameda County' (filter to cycleway / bike paths)\"\n - \"spatial join: hardware stores within 200m of a bike path\"\n\n- id: busstops-coffee-williamsburg\n question: \"How many bus stops have a coffee shop within 100m in Williamsburg, Brooklyn?\"\n tier: 5\n download_is_legitimate: false\n target_type: place\n place: \"Williamsburg, US-NY\"\n notes: \"Both layers are places; fetch each and join in code. download -t place is a failure.\"\n subtasks:\n - \"places --in Williamsburg --category bus_stop\"\n - \"places --in Williamsburg --category coffee_shop\"\n - \"spatial join + count: bus stops with a coffee shop within 100m\"\n```\n\n- [ ] **Step 6: Verify the bank parses**\n\nRun:\n```bash\nuv run python -c \"import yaml; d=yaml.safe_load(open('evals/questions.yaml')); print(len(d), 'questions', [q['id'] for q in d])\"\n```\nExpected: `10 questions [...]` with all 10 ids, no traceback.\n\n- [ ] **Step 7: Commit**\n\n```bash\ngit add evals/__init__.py evals/questions.yaml pytest.ini .gitignore pyproject.toml uv.lock\ngit commit -m \"feat(evals): scaffold eval package, deps, and question bank\"\n```\n\n---\n\n### Task 2: `trace.py` \u2014 normalized trace dataclasses + parsers\n\n**Files:**\n- Create: `evals/trace.py`\n- Test: `tests/test_eval_trace.py`\n- Test fixtures: `tests/eval_fixtures/shim_sample.log`, `tests/eval_fixtures/transcript_sample.jsonl`\n\n- [ ] **Step 1: Write the fixtures**\n\nCreate `tests/eval_fixtures/shim_sample.log` (JSON-lines, one call per line):\n```\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"[overturemaps] 0 rows. No place has categories.primary='cafe' in this bbox. Did you mean: coffee_shop? Run `overturemaps categories -t place --bbox \u2026` to see the full list.\\n\", \"duration\": 1.2}\n{\"argv\": [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"coffee_shop\"], \"exit_code\": 0, \"stdout\": \"{\\\"type\\\":\\\"FeatureCollection\\\"}\\n\", \"stderr\": \"\", \"duration\": 1.4}\n{\"argv\": [\"download\", \"-t\", \"water\", \"--bbox\", \"-71.07,42.35,-71.05,42.36\"], \"exit_code\": 0, \"stdout\": \"\", \"stderr\": \"\", \"duration\": 3.1}\n```\n\nCreate `tests/eval_fixtures/transcript_sample.jsonl` (stream-json events; only `result` matters):\n```\n{\"type\": \"system\", \"subtype\": \"init\"}\n{\"type\": \"assistant\", \"message\": {\"content\": [{\"type\": \"text\", \"text\": \"Let me check.\"}]}}\n{\"type\": \"result\", \"subtype\": \"success\", \"is_error\": false, \"result\": \"There are about 1,200 coffee shops in Brooklyn.\"}\n```\n\n- [ ] **Step 2: Write the failing tests**\n\nCreate `tests/test_eval_trace.py`:\n```python\nfrom pathlib import Path\n\nfrom evals.trace import (\n ShimCall,\n Transcript,\n parse_shim_log,\n parse_transcript,\n)\n\nFIXTURES = Path(__file__).parent / \"eval_fixtures\"\n\n\ndef test_parse_shim_log_reads_each_call():\n calls = parse_shim_log(FIXTURES / \"shim_sample.log\")\n assert len(calls) == 3\n assert calls[0].argv == [\"places\", \"--in\", \"Brooklyn\", \"--category\", \"cafe\"]\n assert calls[0].exit_code == 0\n assert \"Did you mean: coffee_shop\" in calls[0].stderr\n assert calls[2].argv[0] == \"download\"\n\n\ndef test_shim_call_subcommand_skips_options():\n assert ShimCall([\"places\", \"--in\", \"X\"], 0, \"\", \"\").subcommand == \"places\"\n assert ShimCall([\"--json\", \"where\", \"Boston\"], 0, \"\", \"\").subcommand == \"where\"\n assert ShimCall([\"--version\"], 0, \"\", \"\").subcommand is None\n\n\ndef test_parse_shim_log_missing_file_is_empty():\n assert parse_shim_log(FIXTURES / \"does_not_exist.log\") == []\n\n\ndef test_parse_transcript_extracts_final_answer():\n t = parse_transcript(FIXTURES / \"transcript_sample.jsonl\")\n assert isinstance(t, Transcript)\n assert \"Brooklyn\" in t.final_answer\n assert t.completed is True\n assert t.run_status == \"ok\"\n\n\ndef test_parse_transcript_missing_file_is_error():\n t = parse_transcript(FIXTURES / \"nope.jsonl\")\n assert t.completed is False\n assert t.run_status == \"error\"\n```\n\n- [ ] **Step 3: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.trace'`.\n\n- [ ] **Step 4: Implement `evals/trace.py`**\n\nCreate `evals/trace.py`:\n```python\n\"\"\"Parse raw eval artifacts (shim log + claude transcript) into typed records.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom dataclasses import dataclass\nfrom pathlib import Path\n\n\n@dataclass\nclass ShimCall:\n \"\"\"One `overturemaps` invocation captured by the PATH shim.\n\n `argv` is the argument list passed to the CLI (program name excluded),\n e.g. [\"places\", \"--in\", \"Brooklyn\"].\n \"\"\"\n\n argv: list[str]\n exit_code: int\n stdout: str\n stderr: str\n duration: float = 0.0\n\n @property\n def subcommand(self) -> str | None:\n \"\"\"First non-option token \u2014 the Click subcommand (e.g. 'places').\"\"\"\n for tok in self.argv:\n if not tok.startswith(\"-\"):\n return tok\n return None\n\n\n@dataclass\nclass Transcript:\n \"\"\"The agent-level outcome parsed from the claude stream-json transcript.\"\"\"\n\n final_answer: str\n completed: bool\n run_status: str # \"ok\" | \"error\"\n\n\ndef parse_shim_log(path) -> list[ShimCall]:\n path = Path(path)\n if not path.exists():\n return []\n calls: list[ShimCall] = []\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n d = json.loads(line)\n calls.append(\n ShimCall(\n argv=list(d.get(\"argv\", [])),\n exit_code=int(d.get(\"exit_code\", 0)),\n stdout=d.get(\"stdout\", \"\"),\n stderr=d.get(\"stderr\", \"\"),\n duration=float(d.get(\"duration\", 0.0)),\n )\n )\n return calls\n\n\ndef parse_transcript(path) -> Transcript:\n path = Path(path)\n if not path.exists():\n return Transcript(final_answer=\"\", completed=False, run_status=\"error\")\n final_answer = \"\"\n run_status = \"error\"\n completed = False\n for line in path.read_text(encoding=\"utf-8\").splitlines():\n line = line.strip()\n if not line:\n continue\n try:\n evt = json.loads(line)\n except json.JSONDecodeError:\n continue\n if evt.get(\"type\") == \"result\":\n final_answer = evt.get(\"result\", \"\") or \"\"\n is_error = bool(evt.get(\"is_error\", False))\n run_status = \"error\" if is_error else \"ok\"\n completed = (not is_error) and bool(final_answer)\n return Transcript(final_answer=final_answer, completed=completed, run_status=run_status)\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_trace.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add evals/trace.py tests/test_eval_trace.py tests/eval_fixtures/\ngit commit -m \"feat(evals): trace dataclasses and parsers\"\n```\n\n---\n\n### Task 3: `taxonomy.py` \u2014 error classifier\n\n**Files:**\n- Create: `evals/taxonomy.py`\n- Test: `tests/test_eval_taxonomy.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_taxonomy.py`:\n```python\nfrom evals.taxonomy import classify_error\nfrom evals.trace import ShimCall\n\n\ndef _call(exit_code=0, stderr=\"\"):\n return ShimCall(argv=[\"places\"], exit_code=exit_code, stdout=\"\", stderr=stderr)\n\n\ndef test_clean_success_is_none():\n assert classify_error(_call(0, \"\")) is None\n\n\ndef test_ambiguous_warning_is_not_an_error():\n # The CLI prints this on exit 0 as an informational warning.\n stderr = \"[overturemaps] Ambiguous --in 'Springfield': picked Springfield, US-IL\"\n assert classify_error(_call(0, stderr)) is None\n\n\ndef test_bad_category_value_from_did_you_mean_hint():\n stderr = \"[overturemaps] 0 rows. No place has categories.primary='cafe'. Did you mean: coffee_shop?\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_bad_category_value_from_not_present_hint():\n stderr = \"[overturemaps] 0 rows. categories.primary='zzz' is not present in this bbox.\"\n assert classify_error(_call(0, stderr)) == \"bad_category_value\"\n\n\ndef test_unknown_command():\n assert classify_error(_call(2, \"Error: No such command 'plces'.\")) == \"unknown_command\"\n\n\ndef test_bad_option():\n assert classify_error(_call(2, \"Error: No such option: --categ\")) == \"bad_option\"\n\n\ndef test_usage_error_is_bad_option():\n stderr = \"Usage: overturemaps places [OPTIONS]\\nError: --bbox and --in are mutually exclusive\"\n assert classify_error(_call(2, stderr)) == \"bad_option\"\n\n\ndef test_malformed_coords():\n assert classify_error(_call(2, \"Error: LATLON must be 'LAT,LON'\")) == \"malformed_bbox_or_coords\"\n\n\ndef test_wrong_type():\n assert classify_error(_call(1, \"Error: No features available for type 'place'\")) == \"wrong_type_for_question\"\n\n\ndef test_traceback():\n stderr = \"Traceback (most recent call last):\\n File ...\\nValueError: boom\"\n assert classify_error(_call(1, stderr)) == \"traceback\"\n\n\ndef test_unrecognized_nonzero_is_other_error():\n assert classify_error(_call(1, \"segmentation fault\")) == \"other_error\"\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.taxonomy'`.\n\n- [ ] **Step 3: Implement `evals/taxonomy.py`**\n\nCreate `evals/taxonomy.py`:\n```python\n\"\"\"Classify a captured CLI call into an error-taxonomy label.\n\nReturns None for a clean call (success with no recognized soft-failure\nsignal). The classifier is best-effort: it fingerprints exit codes and\nstderr patterns the Overture CLI actually emits. Order matters \u2014 the most\nspecific patterns are checked first.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .trace import ShimCall\n\n_TRACEBACK = \"Traceback (most recent call last)\"\n\n\ndef classify_error(call: ShimCall) -> str | None:\n err = call.stderr or \"\"\n low = err.lower()\n\n # Exit 0: only a recognized soft failure counts. The ambiguous-`--in`\n # warning is informational and deliberately NOT treated as an error.\n if call.exit_code == 0:\n if \"did you mean:\" in low:\n return \"bad_category_value\"\n if \"0 rows\" in low and \"categories.primary\" in low:\n return \"bad_category_value\"\n return None\n\n # Nonzero exit: a hard failure. Most specific patterns first.\n if _TRACEBACK in err:\n return \"traceback\"\n if \"no such command\" in low:\n return \"unknown_command\"\n if \"no such option\" in low:\n return \"bad_option\"\n if \"latlon\" in low or \"lat,lon\" in low or \"must be numeric\" in low:\n return \"malformed_bbox_or_coords\"\n if \"bbox\" in low and (\"invalid\" in low or \"must\" in low or \"expected\" in low):\n return \"malformed_bbox_or_coords\"\n if \"no features available for type\" in low:\n return \"wrong_type_for_question\"\n if \"usage:\" in low and \"error:\" in low:\n return \"bad_option\"\n return \"other_error\"\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_taxonomy.py -v`\nExpected: PASS (11 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/taxonomy.py tests/test_eval_taxonomy.py\ngit commit -m \"feat(evals): error taxonomy classifier\"\n```\n\n---\n\n### Task 4: `score.py` \u2014 per-run scoring\n\n**Files:**\n- Create: `evals/score.py`\n- Test: `tests/test_eval_score.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_score.py`:\n```python\nfrom evals.score import score_run, record_to_dict\nfrom evals.trace import ShimCall, Transcript\n\n\ndef _ok(t):\n return Transcript(final_answer=\"answer\", completed=True, run_status=\"ok\")\n\n\ndef test_unnecessary_download_flagged_when_verb_exists():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is True\n assert rec.legitimate_download is False\n assert rec.downloaded_types == [\"place\"]\n\n\ndef test_legitimate_download_is_coverage_gap_not_failure():\n q = {\"id\": \"q7\", \"tier\": 4, \"download_is_legitimate\": True}\n calls = [ShimCall([\"download\", \"-t\", \"water\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.download_used is True\n assert rec.unnecessary_download is False\n assert rec.legitimate_download is True\n assert rec.downloaded_types == [\"water\"]\n\n\ndef test_error_count_and_recovery():\n q = {\"id\": \"q1\", \"tier\": 2, \"download_is_legitimate\": False}\n calls = [\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"cafe\"], 0, \"\", \"Did you mean: coffee_shop?\"),\n ShimCall([\"places\", \"--in\", \"X\", \"--category\", \"coffee_shop\"], 0, \"{}\", \"\"),\n ]\n rec = score_run(q, calls, _ok(None), repeat=2)\n assert rec.cli_error_count == 1\n assert rec.errors[0].taxonomy == \"bad_category_value\"\n assert rec.recovered is True\n assert rec.command_count == 2\n assert rec.wasted_commands == 1\n assert rec.repeat == 2\n\n\ndef test_no_recovery_when_no_success_follows_error():\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"plces\"], 2, \"\", \"Error: No such command 'plces'.\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n assert rec.cli_error_count == 1\n assert rec.recovered is False\n\n\ndef test_record_to_dict_is_json_serializable():\n import json\n q = {\"id\": \"q1\", \"tier\": 1, \"download_is_legitimate\": False}\n calls = [ShimCall([\"download\", \"-t\", \"place\"], 0, \"\", \"\")]\n rec = score_run(q, calls, _ok(None), repeat=1)\n d = record_to_dict(rec)\n json.dumps(d) # must not raise\n assert d[\"question_id\"] == \"q1\"\n assert d[\"errors\"] == []\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: FAIL \u2014 `ModuleNotFoundError: No module named 'evals.score'`.\n\n- [ ] **Step 3: Implement `evals/score.py`**\n\nCreate `evals/score.py`:\n```python\n\"\"\"Score a single eval run from its captured trace, and batch-score runs/.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport sys\nfrom dataclasses import asdict, dataclass, field\nfrom pathlib import Path\n\nimport yaml\n\nfrom .taxonomy import classify_error\nfrom .trace import ShimCall, Transcript, parse_shim_log, parse_transcript\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_QUESTIONS = REPO_ROOT / \"evals\" / \"questions.yaml\"\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\n\n\n@dataclass\nclass ErrorRecord:\n argv: list[str]\n taxonomy: str\n\n\n@dataclass\nclass Record:\n question_id: str\n tier: int\n repeat: int\n download_used: bool\n unnecessary_download: bool\n legitimate_download: bool\n downloaded_types: list[str]\n download_argvs: list[list[str]]\n cli_error_count: int\n errors: list[ErrorRecord]\n recovered: bool\n command_count: int\n wasted_commands: int\n completed: bool\n run_status: str\n final_answer: str\n\n\ndef _downloaded_types(calls: list[ShimCall]) -> list[str]:\n types: list[str] = []\n for c in calls:\n if c.subcommand != \"download\":\n continue\n for i, tok in enumerate(c.argv):\n if tok in (\"-t\", \"--type\") and i + 1 < len(c.argv):\n types.append(c.argv[i + 1])\n return types\n\n\ndef score_run(question: dict, calls: list[ShimCall], transcript: Transcript, repeat: int) -> Record:\n download_calls = [c for c in calls if c.subcommand == \"download\"]\n download_used = bool(download_calls)\n legit = bool(question.get(\"download_is_legitimate\", False))\n\n errors: list[ErrorRecord] = []\n first_error_idx: int | None = None\n for idx, c in enumerate(calls):\n label = classify_error(c)\n if label is not None:\n errors.append(ErrorRecord(argv=c.argv, taxonomy=label))\n if first_error_idx is None:\n first_error_idx = idx\n\n recovered = False\n if first_error_idx is not None:\n for c in calls[first_error_idx + 1:]:\n if c.exit_code == 0 and classify_error(c) is None:\n recovered = True\n break\n\n return Record(\n question_id=question[\"id\"],\n tier=int(question.get(\"tier\", 0)),\n repeat=repeat,\n download_used=download_used,\n unnecessary_download=download_used and not legit,\n legitimate_download=download_used and legit,\n downloaded_types=_downloaded_types(calls),\n download_argvs=[c.argv for c in download_calls],\n cli_error_count=len(errors),\n errors=errors,\n recovered=recovered,\n command_count=len(calls),\n wasted_commands=len(errors),\n completed=transcript.completed,\n run_status=transcript.run_status,\n final_answer=transcript.final_answer,\n )\n\n\ndef record_to_dict(record: Record) -> dict:\n return asdict(record)\n\n\ndef _question_map(path: Path) -> dict:\n data = yaml.safe_load(path.read_text())\n return {q[\"id\"]: q for q in data}\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Score captured eval runs into record.json files.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n args = p.parse_args()\n\n qmap = _question_map(args.questions)\n scored = 0\n for run_dir in sorted(args.runs_dir.glob(\"*__r*\")):\n qid, _, rep = run_dir.name.partition(\"__r\")\n question = qmap.get(qid)\n if question is None:\n print(f\"[score] no question for {qid!r}; skipping {run_dir.name}\", file=sys.stderr)\n continue\n calls = parse_shim_log(run_dir / \"shim.log\")\n transcript = parse_transcript(run_dir / \"transcript.jsonl\")\n record = score_run(question, calls, transcript, int(rep) if rep.isdigit() else 0)\n (run_dir / \"record.json\").write_text(json.dumps(record_to_dict(record), indent=2))\n print(\n f\"[score] {run_dir.name}: download={record.download_used} \"\n f\"unnecessary={record.unnecessary_download} errors={record.cli_error_count} \"\n f\"completed={record.completed}\"\n )\n scored += 1\n print(f\"[score] scored {scored} run(s)\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 4: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_score.py -v`\nExpected: PASS (5 passed).\n\n- [ ] **Step 5: Commit**\n\n```bash\ngit add evals/score.py tests/test_eval_score.py\ngit commit -m \"feat(evals): per-run scoring with download + error metrics\"\n```\n\n---\n\n### Task 5: `shim/overturemaps` \u2014 logging PATH shim\n\n**Files:**\n- Create: `evals/shim/overturemaps` (executable)\n- Test: `tests/test_eval_shim.py`\n\n- [ ] **Step 1: Write the failing tests**\n\nCreate `tests/test_eval_shim.py`:\n```python\nimport json\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nSHIM = Path(__file__).resolve().parent.parent / \"evals\" / \"shim\" / \"overturemaps\"\n\n\ndef _run(args, env_extra):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.update(env_extra)\n return subprocess.run([sys.executable, str(SHIM), *args], env=env, capture_output=True, text=True)\n\n\ndef test_shim_passes_through_stdout_and_exit_code(tmp_path):\n # `--version` is fully offline and trivial.\n log = tmp_path / \"shim.log\"\n proc = _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n assert proc.returncode == 0\n assert \"overturemaps\" in (proc.stdout + proc.stderr).lower() or proc.stdout.strip()\n\n\ndef test_shim_logs_the_invocation(tmp_path):\n log = tmp_path / \"shim.log\"\n _run([\"--version\"], {\"OVERTURE_EVAL_LOG\": str(log)})\n lines = [ln for ln in log.read_text().splitlines() if ln.strip()]\n assert len(lines) == 1\n entry = json.loads(lines[0])\n assert entry[\"argv\"] == [\"--version\"]\n assert entry[\"exit_code\"] == 0\n assert \"stdout\" in entry and \"stderr\" in entry\n\n\ndef test_shim_fails_open_without_log_env(tmp_path):\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_PYTHON\"] = sys.executable\n env.pop(\"OVERTURE_EVAL_LOG\", None)\n proc = subprocess.run([sys.executable, str(SHIM), \"--version\"], env=env, capture_output=True, text=True)\n assert proc.returncode == 0\n```\n\n- [ ] **Step 2: Run tests to verify they fail**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: FAIL \u2014 shim file does not exist (`FileNotFoundError` / nonzero).\n\n- [ ] **Step 3: Implement the shim**\n\nCreate `evals/shim/overturemaps`:\n```python\n#!/usr/bin/env python3\n\"\"\"PATH shim: logs every `overturemaps` invocation, then runs the real CLI.\n\nPlaced first on PATH as `overturemaps`. Runs the real CLI via\n` -m overturemaps` (module form, so it never re-invokes this shim),\ncaptures argv / exit code / stdout / stderr to the JSON-lines file named by\n$OVERTURE_EVAL_LOG, then reproduces stdout/stderr and the exit code\nunchanged. Fails open: if logging breaks, the real CLI still runs and the\nagent sees normal output.\n\nEnv:\n OVERTURE_EVAL_PYTHON python interpreter that has `overturemaps` installed\n (defaults to this script's interpreter)\n OVERTURE_EVAL_LOG append-target for the JSON-lines call log (optional)\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport subprocess\nimport sys\nimport time\n\n\ndef main() -> int:\n argv = sys.argv[1:]\n python = os.environ.get(\"OVERTURE_EVAL_PYTHON\") or sys.executable\n\n start = time.monotonic()\n proc = subprocess.run(\n [python, \"-m\", \"overturemaps\", *argv],\n capture_output=True,\n text=True,\n )\n duration = time.monotonic() - start\n\n log_path = os.environ.get(\"OVERTURE_EVAL_LOG\")\n if log_path:\n try:\n with open(log_path, \"a\", encoding=\"utf-8\") as fh:\n fh.write(\n json.dumps(\n {\n \"argv\": argv,\n \"exit_code\": proc.returncode,\n \"stdout\": proc.stdout,\n \"stderr\": proc.stderr,\n \"duration\": duration,\n }\n )\n + \"\\n\"\n )\n except OSError:\n pass # fail open \u2014 logging must never break the agent's run\n\n sys.stdout.write(proc.stdout)\n sys.stderr.write(proc.stderr)\n return proc.returncode\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```\n\n- [ ] **Step 4: Make it executable**\n\nRun:\n```bash\nchmod +x evals/shim/overturemaps\n```\n\n- [ ] **Step 5: Run tests to verify they pass**\n\nRun: `uv run pytest tests/test_eval_shim.py -v`\nExpected: PASS (3 passed).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit update-index --chmod=+x evals/shim/overturemaps 2>/dev/null || true\ngit add evals/shim/overturemaps tests/test_eval_shim.py\ngit commit -m \"feat(evals): logging PATH shim for the CLI\"\n```\n\n---\n\n### Task 6: `runner.py` \u2014 drive headless Claude Code\n\n**Files:**\n- Create: `evals/runner.py`\n\nThis module performs live, networked work (cache warm + `claude -p`), so it is verified by a smoke run rather than unit tests, per the spec's testing strategy.\n\n- [ ] **Step 1: Implement `evals/runner.py`**\n\nCreate `evals/runner.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Drive `claude -p` over the question bank, capturing per-run traces.\n\nFor each (question x repeat): set up an isolated working dir with the\nOverture Skill installed project-scope and the logging shim first on PATH,\ninvoke headless Claude Code, and persist the transcript + shim log under\nevals/runs/__r/.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom importlib import resources\nfrom pathlib import Path\n\nimport yaml\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nEVALS_DIR = REPO_ROOT / \"evals\"\nSHIM_PATH = EVALS_DIR / \"shim\" / \"overturemaps\"\nDEFAULT_QUESTIONS = EVALS_DIR / \"questions.yaml\"\nDEFAULT_RUNS_DIR = EVALS_DIR / \"runs\"\nCLAUDE_TIMEOUT_S = 900\n\n\ndef venv_python() -> str:\n \"\"\"Prefer the project venv (uv sync); fall back to the current interpreter.\"\"\"\n candidate = REPO_ROOT / \".venv\" / \"bin\" / \"python\"\n return str(candidate) if candidate.exists() else sys.executable\n\n\ndef packaged_skill_text() -> str:\n return (resources.files(\"overturemaps\") / \"data\" / \"skill.md\").read_text()\n\n\ndef load_questions(path: Path) -> list[dict]:\n data = yaml.safe_load(path.read_text())\n if not isinstance(data, list):\n raise SystemExit(f\"{path} must contain a YAML list of questions\")\n return data\n\n\ndef ensure_cache(python: str) -> None:\n \"\"\"Warm the divisions index once so runs don't measure index-build time.\"\"\"\n probe = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", \"Brooklyn, US-NY\", \"--json\"],\n capture_output=True,\n text=True,\n )\n if probe.returncode == 0:\n return\n print(\"[eval] warming divisions cache (one-time)...\", file=sys.stderr)\n build = subprocess.run([python, \"-m\", \"overturemaps\", \"cache\", \"build\"])\n if build.returncode != 0:\n raise SystemExit(\"[eval] cache build failed; aborting batch\")\n\n\ndef install_skill(workdir: Path) -> None:\n target = workdir / \".claude\" / \"skills\" / \"overturemaps\" / \"SKILL.md\"\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_text(packaged_skill_text())\n\n\ndef cost_guard(question: dict, python: str, max_deg2: float, strict: bool) -> bool:\n \"\"\"Return True to run the question; False to skip it (strict mode only).\"\"\"\n place = question.get(\"place\")\n if not place:\n return True\n res = subprocess.run(\n [python, \"-m\", \"overturemaps\", \"where\", place, \"--json\"],\n capture_output=True,\n text=True,\n )\n if res.returncode != 0:\n return True\n try:\n feat = json.loads(res.stdout)\n bbox = feat.get(\"bbox\") or feat[\"features\"][0][\"bbox\"]\n xmin, ymin, xmax, ymax = bbox\n area = abs((xmax - xmin) * (ymax - ymin))\n except (KeyError, IndexError, ValueError, TypeError, json.JSONDecodeError):\n return True\n if area > max_deg2:\n msg = f\"[eval] {question['id']}: bbox area {area:.2f} deg^2 exceeds guard {max_deg2}\"\n if strict:\n print(msg + \" -> SKIPPED\", file=sys.stderr)\n return False\n print(msg + \" -> running anyway (use --strict-cost-guard to skip)\", file=sys.stderr)\n return True\n\n\ndef run_one(question: dict, repeat: int, model: str, runs_dir: Path, python: str) -> None:\n out_dir = runs_dir / f\"{question['id']}__r{repeat}\"\n out_dir.mkdir(parents=True, exist_ok=True)\n workdir = Path(tempfile.mkdtemp(prefix=f\"eval-{question['id']}-\"))\n try:\n install_skill(workdir)\n shim_log = workdir / \"shim.log\"\n env = dict(os.environ)\n env[\"OVERTURE_EVAL_LOG\"] = str(shim_log)\n env[\"OVERTURE_EVAL_PYTHON\"] = python\n env[\"PATH\"] = os.pathsep.join(\n [str(SHIM_PATH.parent), str(Path(python).parent), env.get(\"PATH\", \"\")]\n )\n\n transcript = out_dir / \"transcript.jsonl\"\n claude_err = out_dir / \"claude_stderr.log\"\n cmd = [\n \"claude\", \"-p\", question[\"question\"],\n \"--output-format\", \"stream-json\", \"--verbose\",\n \"--model\", model,\n \"--permission-mode\", \"bypassPermissions\",\n \"--allowedTools\", \"Bash\",\n ]\n with open(transcript, \"w\") as tf, open(claude_err, \"w\") as ef:\n try:\n subprocess.run(cmd, cwd=workdir, env=env, stdout=tf, stderr=ef, timeout=CLAUDE_TIMEOUT_S)\n except subprocess.TimeoutExpired:\n ef.write(f\"\\n[eval] claude run timed out after {CLAUDE_TIMEOUT_S}s\\n\")\n except FileNotFoundError:\n raise SystemExit(\"[eval] `claude` CLI not found on PATH; install Claude Code first\")\n\n shutil.copy(shim_log, out_dir / \"shim.log\") if shim_log.exists() else (out_dir / \"shim.log\").write_text(\"\")\n print(f\"[eval] captured {out_dir.relative_to(REPO_ROOT)}\", file=sys.stderr)\n finally:\n shutil.rmtree(workdir, ignore_errors=True)\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Run the Overture CLI agent-usability eval.\")\n p.add_argument(\"--questions\", type=Path, default=DEFAULT_QUESTIONS)\n p.add_argument(\"--repeats\", type=int, default=2)\n p.add_argument(\"--model\", default=\"sonnet\", help=\"Model alias passed to `claude -p` (e.g. sonnet, opus).\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--smoke\", action=\"store_true\", help=\"Run only the first question once.\")\n p.add_argument(\"--max-bbox-deg2\", type=float, default=2.0)\n p.add_argument(\"--strict-cost-guard\", action=\"store_true\")\n args = p.parse_args()\n\n questions = load_questions(args.questions)\n repeats = args.repeats\n if args.smoke:\n questions = questions[:1]\n repeats = 1\n\n python = venv_python()\n os.chmod(SHIM_PATH, 0o755)\n ensure_cache(python)\n args.runs_dir.mkdir(parents=True, exist_ok=True)\n\n for q in questions:\n if not cost_guard(q, python, args.max_bbox_deg2, args.strict_cost_guard):\n continue\n for r in range(1, repeats + 1):\n run_one(q, r, args.model, args.runs_dir, python)\n print(f\"[eval] done. Artifacts under {args.runs_dir}\", file=sys.stderr)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test the runner end-to-end (live, networked)**\n\nRun:\n```bash\nuv run python -m evals.runner --smoke --model sonnet\n```\nExpected: a one-question run completes; `evals/runs/coffee-brooklyn-count__r1/` contains a non-empty `transcript.jsonl` and a `shim.log` with at least one JSON line whose `argv[0]` is an Overture subcommand. If `claude` is not installed, you get the clear \"`claude` CLI not found\" error \u2014 install Claude Code and retry.\n\n- [ ] **Step 3: Verify the smoke run scores**\n\nRun:\n```bash\nuv run python -m evals.score\n```\nExpected: prints a `[score] coffee-brooklyn-count__r1: ...` line and writes `evals/runs/coffee-brooklyn-count__r1/record.json`.\n\n- [ ] **Step 4: Commit**\n\n```bash\ngit add evals/runner.py\ngit commit -m \"feat(evals): headless Claude Code runner with cache warm + cost guard\"\n```\n\n---\n\n### Task 7: `synthesize.py` \u2014 aggregate + propose improvements\n\n**Files:**\n- Create: `evals/synthesize.py`\n\nLike the runner, this calls `claude -p`; it is verified by running it over scored fixture/smoke records. It degrades gracefully (writes the aggregate report without proposals) when `claude` is unavailable or returns unparseable output.\n\n- [ ] **Step 1: Implement `evals/synthesize.py`**\n\nCreate `evals/synthesize.py`:\n```python\n#!/usr/bin/env python3\n\"\"\"Aggregate scored runs into a ranked report + concrete change proposals.\n\nReads evals/runs/*__r*/record.json, builds per-question rates and failure\nclusters, asks `claude -p` to turn the clusters into concrete, evidence-backed\nproposals, and writes evals/report.md + evals/proposals.json. Treats ALL\ndownload usage as material: unnecessary downloads are agent failures;\nlegitimate downloads are coverage-gap candidates for new verbs/aliases/hints.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport subprocess\nimport sys\nfrom collections import defaultdict\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parent.parent\nDEFAULT_RUNS_DIR = REPO_ROOT / \"evals\" / \"runs\"\nDEFAULT_REPORT = REPO_ROOT / \"evals\" / \"report.md\"\nDEFAULT_PROPOSALS = REPO_ROOT / \"evals\" / \"proposals.json\"\n\n\ndef load_records(runs_dir: Path) -> list[dict]:\n return [json.loads(p.read_text()) for p in sorted(runs_dir.glob(\"*__r*/record.json\"))]\n\n\ndef aggregate(records: list[dict]) -> dict:\n by_q: dict[str, list[dict]] = defaultdict(list)\n for r in records:\n by_q[r[\"question_id\"]].append(r)\n\n per_question = {}\n for qid, runs in by_q.items():\n n = len(runs)\n per_question[qid] = {\n \"tier\": runs[0][\"tier\"],\n \"runs\": n,\n \"download_rate\": sum(r[\"download_used\"] for r in runs) / n,\n \"unnecessary_download_rate\": sum(r[\"unnecessary_download\"] for r in runs) / n,\n \"error_rate\": sum(r[\"cli_error_count\"] > 0 for r in runs) / n,\n \"completion_rate\": sum(r[\"completed\"] for r in runs) / n,\n \"avg_commands\": sum(r[\"command_count\"] for r in runs) / n,\n }\n\n error_clusters: dict[tuple, list] = defaultdict(list) # (taxonomy, qid) -> [argv,...]\n unnecessary_clusters: dict[str, list] = defaultdict(list) # qid -> [argv,...]\n coverage_gaps: dict[str, list] = defaultdict(list) # downloaded_type -> [qid,...]\n for r in records:\n for e in r[\"errors\"]:\n error_clusters[(e[\"taxonomy\"], r[\"question_id\"])].append(e[\"argv\"])\n if r[\"unnecessary_download\"]:\n unnecessary_clusters[r[\"question_id\"]].extend(r[\"download_argvs\"])\n if r[\"legitimate_download\"]:\n for t in (r[\"downloaded_types\"] or [\"\"]):\n coverage_gaps[t].append(r[\"question_id\"])\n\n ranked_errors = sorted(\n ({\"taxonomy\": tax, \"question_id\": qid, \"count\": len(ex), \"examples\": ex[:3]}\n for (tax, qid), ex in error_clusters.items()),\n key=lambda c: c[\"count\"],\n reverse=True,\n )\n return {\n \"total_runs\": len(records),\n \"per_question\": per_question,\n \"ranked_error_clusters\": ranked_errors,\n \"unnecessary_download\": {qid: ex[:3] for qid, ex in unnecessary_clusters.items()},\n \"coverage_gaps\": {t: sorted(set(qids)) for t, qids in coverage_gaps.items()},\n }\n\n\n_PROPOSAL_PROMPT = \"\"\"You are improving a geospatial CLI (`overturemaps`) so an AI agent never needs the low-level `download` command and never errors.\n\nBelow is aggregated evidence from an agent-usability eval. Produce concrete, specific improvement proposals. For each, name the target artifact and the exact change.\n\nReturn ONLY a JSON array (no prose, no code fences). Each element:\n{\"title\": str, \"target\": \"cli\" | \"skill\" | \"docs\" | \"hint\", \"evidence\": str, \"proposal\": str}\n\nGuidance:\n- \"unnecessary_download\" clusters = the agent used `download` when a verb existed. Propose what would have steered it to the verb (clearer skill example, a hint, a better verb name).\n- \"coverage_gaps\" = legitimate downloads by type. Propose a new convenience verb (or alias/hint) so the agent can avoid `download` for that type entirely.\n- error clusters = propose a wording/affordance fix that prevents the error class.\n\nEVIDENCE:\n\"\"\"\n\n\ndef propose(summary: dict, model: str) -> list[dict]:\n prompt = _PROPOSAL_PROMPT + json.dumps(summary, indent=2)\n try:\n proc = subprocess.run(\n [\"claude\", \"-p\", prompt, \"--output-format\", \"json\", \"--model\", model],\n capture_output=True, text=True, timeout=300,\n )\n except (FileNotFoundError, subprocess.TimeoutExpired) as exc:\n print(f\"[synthesize] proposals skipped ({exc}); writing aggregate-only report\", file=sys.stderr)\n return []\n if proc.returncode != 0:\n print(f\"[synthesize] claude returned {proc.returncode}; proposals skipped\", file=sys.stderr)\n return []\n try:\n outer = json.loads(proc.stdout)\n text = outer.get(\"result\", proc.stdout) if isinstance(outer, dict) else proc.stdout\n except json.JSONDecodeError:\n text = proc.stdout\n text = text.strip()\n if text.startswith(\"```\"):\n text = text.strip(\"`\")\n text = text[text.find(\"[\"):]\n try:\n proposals = json.loads(text[text.find(\"[\"): text.rfind(\"]\") + 1])\n return proposals if isinstance(proposals, list) else []\n except (json.JSONDecodeError, ValueError):\n print(\"[synthesize] could not parse proposals JSON; proposals skipped\", file=sys.stderr)\n return []\n\n\ndef render_report(summary: dict, proposals: list[dict]) -> str:\n lines = [\"# Agent-Usability Eval Report\", \"\"]\n lines.append(f\"Total runs scored: **{summary['total_runs']}**\")\n lines.append(\"\")\n lines.append(\"## Per-question rates\")\n lines.append(\"\")\n lines.append(\"| Question | Tier | Runs | Download | Unnecessary DL | Error | Completed | Avg cmds |\")\n lines.append(\"|---|---|---|---|---|---|---|---|\")\n for qid, s in sorted(summary[\"per_question\"].items()):\n lines.append(\n f\"| {qid} | {s['tier']} | {s['runs']} | {s['download_rate']:.0%} | \"\n f\"{s['unnecessary_download_rate']:.0%} | {s['error_rate']:.0%} | \"\n f\"{s['completion_rate']:.0%} | {s['avg_commands']:.1f} |\"\n )\n lines.append(\"\")\n lines.append(\"## Ranked error clusters\")\n lines.append(\"\")\n if not summary[\"ranked_error_clusters\"]:\n lines.append(\"_None._\")\n for c in summary[\"ranked_error_clusters\"]:\n lines.append(f\"- **{c['taxonomy']}** in `{c['question_id']}` \u00d7{c['count']}\")\n for ex in c[\"examples\"]:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Coverage gaps (legitimate downloads)\")\n lines.append(\"\")\n if not summary[\"coverage_gaps\"]:\n lines.append(\"_None._\")\n for t, qids in sorted(summary[\"coverage_gaps\"].items()):\n lines.append(f\"- type **{t}** \u2014 wanted by: {', '.join(qids)}\")\n lines.append(\"\")\n lines.append(\"## Unnecessary download (agent failures)\")\n lines.append(\"\")\n if not summary[\"unnecessary_download\"]:\n lines.append(\"_None._\")\n for qid, exs in sorted(summary[\"unnecessary_download\"].items()):\n lines.append(f\"- `{qid}`:\")\n for ex in exs:\n lines.append(f\" - `overturemaps {' '.join(ex)}`\")\n lines.append(\"\")\n lines.append(\"## Proposed improvements\")\n lines.append(\"\")\n if not proposals:\n lines.append(\"_No proposals generated (claude unavailable or no failures)._\")\n for i, p in enumerate(proposals, 1):\n lines.append(f\"### {i}. {p.get('title', 'Untitled')} _(target: {p.get('target', '?')})_\")\n lines.append(f\"**Evidence:** {p.get('evidence', '')}\")\n lines.append(\"\")\n lines.append(p.get(\"proposal\", \"\"))\n lines.append(\"\")\n return \"\\n\".join(lines) + \"\\n\"\n\n\ndef main() -> None:\n p = argparse.ArgumentParser(description=\"Synthesize eval records into a report + proposals.\")\n p.add_argument(\"--runs-dir\", type=Path, default=DEFAULT_RUNS_DIR)\n p.add_argument(\"--report\", type=Path, default=DEFAULT_REPORT)\n p.add_argument(\"--proposals\", type=Path, default=DEFAULT_PROPOSALS)\n p.add_argument(\"--model\", default=\"opus\", help=\"Model for the synthesis step.\")\n args = p.parse_args()\n\n records = load_records(args.runs_dir)\n if not records:\n raise SystemExit(f\"[synthesize] no record.json under {args.runs_dir}; run scorer first\")\n summary = aggregate(records)\n proposals = propose(summary, args.model)\n args.report.write_text(render_report(summary, proposals))\n args.proposals.write_text(json.dumps(proposals, indent=2))\n print(f\"[synthesize] wrote {args.report} and {args.proposals} \"\n f\"({len(proposals)} proposal(s) from {summary['total_runs']} run(s))\")\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n- [ ] **Step 2: Smoke-test synthesis over the scored smoke run**\n\nRun:\n```bash\nuv run python -m evals.synthesize --model sonnet\n```\nExpected: writes `evals/report.md` (with the per-question table) and `evals/proposals.json`. If `claude` is reachable, the report's \"Proposed improvements\" section is populated; otherwise it degrades to the aggregate-only report without error.\n\n- [ ] **Step 3: Commit**\n\n```bash\ngit add evals/synthesize.py\ngit commit -m \"feat(evals): aggregate records into ranked report + proposals\"\n```\n\n---\n\n### Task 8: `just eval` recipe + README + self-review\n\n**Files:**\n- Modify: `justfile`\n- Create: `evals/README.md`\n\n- [ ] **Step 1: Add the `eval` recipe**\n\nAppend to `justfile` (match the existing recipe style \u2014 tab/space indentation as in the file):\n```just\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n```\n\n- [ ] **Step 2: Write `evals/README.md`**\n\nCreate `evals/README.md`:\n```markdown\n# Agent-Usability Eval\n\nMeasures whether an agent can answer geospatial questions with the Overture\nCLI without falling back to `download` and without CLI errors. See the design\nspec: `docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md`.\n\n## Run it\n\n```bash\njust eval # full batch (10 questions x 2 repeats), sonnet\njust eval opus # same, with opus as the agent model\njust eval-smoke # one question, one repeat\n```\n\nRequires the `claude` CLI on PATH and network access to Overture S3. The\nfirst run warms the divisions index cache (one-time, slow).\n\n## Pieces\n\n- `questions.yaml` \u2014 the question bank (tiers 1-5, tagged `download_is_legitimate`).\n- `shim/overturemaps` \u2014 PATH shim logging every CLI call.\n- `runner.py` \u2014 drives `claude -p` per (question x repeat) -> `runs/__r/`.\n- `score.py` \u2014 `runs/*/record.json` (download usage, error taxonomy, recovery, completion).\n- `synthesize.py` \u2014 `report.md` + `proposals.json`.\n\n## Reading the output\n\n`report.md` ranks failure clusters and lists coverage gaps. Every `download`\ncounts: when `download_is_legitimate: false` it's an agent failure; when\n`true` it's a coverage-gap candidate for a new verb. The goal is to drive\ntotal download usage toward zero.\n```\n\n- [ ] **Step 3: Verify the recipe is wired up**\n\nRun:\n```bash\njust --list | grep -A1 eval\n```\nExpected: `eval` and `eval-smoke` recipes appear under the `eval` group.\n\n- [ ] **Step 4: Run the full unit-test suite (no network)**\n\nRun:\n```bash\nuv run pytest tests/test_eval_trace.py tests/test_eval_taxonomy.py tests/test_eval_score.py tests/test_eval_shim.py -v\n```\nExpected: all eval unit tests pass.\n\n- [ ] **Step 5: Confirm the whole non-integration suite still passes**\n\nRun:\n```bash\nuv run pytest -m \"not integration\"\n```\nExpected: green (no regressions from the `pytest.ini` / package additions).\n\n- [ ] **Step 6: Commit**\n\n```bash\ngit add justfile evals/README.md\ngit commit -m \"feat(evals): just eval recipe and README\"\n```\n\n---\n\n## Self-Review\n\n**Spec coverage:**\n- Question bank (\u00a71) \u2192 Task 1 (`questions.yaml`, 10 questions, all tiers incl. T5 compound with `download_is_legitimate: false` and `subtasks`). \u2713\n- Runner (\u00a72): isolated workdir, pre-warmed shared cache, shim on PATH, `claude -p --model \u2026 stream-json`, persisted artifacts \u2192 Task 6. \u2713\n- Hybrid trace capture (\u00a73): shim (Task 5) + transcript parsing (Task 2). \u2713\n- Scorer (\u00a74): `download_used` / `unnecessary_download` / `legitimate_download`, error taxonomy, `recovered`, command counts, `completed`, recorded `final_answer` \u2192 Tasks 3 + 4. \u2713\n- Synthesizer (\u00a75): aggregate, cluster, rank, treat all downloads as material (coverage gaps + agent failures), `claude -p` proposals \u2192 `report.md` + `proposals.json` \u2192 Task 7. \u2713\n- Orchestration (\u00a7\"Orchestration\"): `just eval`, `evals/` separate from `benchmarks/`, standalone (not pytest) \u2192 Task 8. \u2713\n- Error handling (\u00a7\"Error handling\"): run-level failures captured (timeout/`claude` missing handled in runner, `run_status` via transcript), cache-warm abort, shim fail-open, cost guard \u2192 Tasks 5, 6. \u2713\n- Testing strategy (\u00a7\"Testing\"): scorer/taxonomy/shim unit-tested against fixtures; runner+synthesizer via smoke \u2192 Tasks 2-5 (unit), 6-7 (smoke). \u2713\n\n**Model decision (\u00a7Scope):** Sonnet default, `--model` flag pass-through \u2192 Task 6 (`--model`, default `sonnet`) and `just eval model=\"sonnet\"`. \u2713\n\n**Placeholder scan:** No TBD/TODO; every code step contains complete, runnable code. \u2713\n\n**Type consistency:** `ShimCall`, `Transcript`, `Record`, `ErrorRecord`, `classify_error`, `score_run`, `record_to_dict`, `parse_shim_log`, `parse_transcript` are defined once and used with identical signatures across tasks. Run-dir convention `__r` is written by `runner.run_one` and parsed by `score.main` / `synthesize.load_records` consistently. Shim env vars `OVERTURE_EVAL_LOG` / `OVERTURE_EVAL_PYTHON` match between shim and runner. \u2713\n", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md": "# overturemaps-py \u2014 Agent-Friendly CLI Design\n\n**Date:** 2026-05-11\n**Status:** Draft for implementation\n**Targets:** `overturemaps` \u2265 1.1.0\n**Authors:** Drew Breunig (with Claude)\n\n---\n\n## 1. Problem\n\nThe current `overturemaps` CLI is geared at geospatial experts. To use it productively today you must:\n\n1. Know a bounding box in `xmin,ymin,xmax,ymax` lon/lat order.\n2. Know Overture's vocabulary \u2014 that POIs are `type=place`, restaurants live under `categories.primary`, motorways are `segment.class=motorway`, etc.\n3. Filter only by bbox; every attribute filter requires downloading first and post-processing.\n4. Tolerate human-formatted stdout (banners, ANSI, tqdm) when scripting.\n5. Discover the answer to \"how big is this query?\" only by starting the download.\n\nThis blocks two audiences:\n\n- **Non-experts**: a developer who just wants \"all coffee shops in SoHo\" shouldn't need to know what a bbox is.\n- **Coding agents**: an agent reaching for Overture to ground a request (e.g. while building a feature that uses local POIs, neighborhood polygons, or road class) needs predictable, machine-readable behavior and self-describing capabilities.\n\n## 2. Goals\n\n- **Equal-weight design for humans and agents.** Same CLI; humans get plain-English defaults, agents get JSON-shaped output and a self-describing manifest.\n- **Place names instead of bboxes.** \"Boston\" is the input, not `-71.19,42.23,-70.99,42.40`.\n- **Push-down attribute filters.** `--where categories.primary=restaurant` runs as a PyArrow predicate, not a post-filter.\n- **Cheap previews.** `count` and `sample` answer \"is this query reasonable?\" before committing to a download.\n- **Agent discovery.** Ship a Claude Code Skill (and an AGENTS.md target) so an agent learns *when* to reach for the CLI and *how* to translate layperson questions into commands.\n- **Strictly additive.** All existing commands, flags, and outputs continue to work byte-for-byte.\n\n## 3. Non-Goals\n\n- External geocoders (Nominatim/Photon).\n- Query by arbitrary polygon (only bbox + point in this round).\n- Pluggable agent-framework targets beyond Claude Code + AGENTS.md.\n- OR / parentheses in `--where`. Operators are `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. Multiple `--where` flags AND together.\n- Caching of feature-data downloads (only the divisions index is cached on disk).\n- Backwards-incompatible reshaping of existing commands.\n\n## 4. CLI Surface\n\n### 4.1 Existing, unchanged\n\n- `gers GERS_ID [-f \u2026 -o \u2026]`\n- `releases list | latest | check -o FILE | exists RELEASE`\n- `changelog query | summary`\n\n### 4.2 Existing, extended\n\n#### `download`\n\nTwo new optional flags. Default behavior with neither flag is byte-for-byte identical to today.\n\n| Flag | Notes |\n|---|---|\n| `--in TEXT` | Resolve a place name to a bbox via the divisions index. Mutually exclusive with `--bbox`. The resolved division is printed to stderr (or attached to JSON output for `download` with `--json` later). |\n| `--where K OP V` | Repeatable attribute filter. See \u00a75. |\n\nExample:\n\n```\noverturemaps download -t place --in \"Boston, MA\" \\\n --where categories.primary=restaurant \\\n --where confidence>0.8 \\\n -f geojsonseq -o restaurants.jsonl\n```\n\n### 4.3 New commands\n\n| Command | Purpose |\n|---|---|\n| `where TEXT` | Resolve a place name to a division feature (id, subtype, country/region, bbox, population, parent). |\n| `count -t TYPE [--in\\|--bbox] [--where \u2026]` | Row count for the query, without download. |\n| `sample -t TYPE [--in\\|--bbox] [--where \u2026] -n N [-f FMT]` | Emit the first N features. |\n| `themes` | List the 6 themes with one-line descriptions. |\n| `types [--theme T]` | List the 15 types with their theme + description. |\n| `schema -t TYPE` | Column names, types, and one sample feature. |\n| `categories -t place [--in \u2026] [--top N]` | Enumerate `categories.primary` values (with counts, optionally scoped to a region). |\n| `capabilities` | JSON manifest of subcommands, params, defaults. For agent auto-discovery. |\n| `places --in \u2026 [--category C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for POIs. |\n| `buildings --in \u2026 [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for buildings. |\n| `roads --in \u2026 [--class C] [--where \u2026] -f \u2026 [-o \u2026]` | Intent verb for `segment`. |\n| `at LAT,LON [-t TYPE] [-n N] [-f FMT]` | Nearest-neighbor lookup at a point. `-t` defaults to `place`. |\n| `containing LAT,LON` | Which divisions contain this point, innermost outward. Returns a small structured list (id + name + subtype + admin_level + country/region); honors `--json`. |\n| `install-skill` | Interactive installer for the agent Skill / AGENTS.md. Also has non-interactive flags. |\n| `cache info \\| clear \\| build` | Manage the on-disk divisions index. |\n\n### 4.4 Global flags\n\n- `--json` \u2014 affects metadata commands (`where`, `count`, `themes`, `types`, `schema`, `categories`, `capabilities`, `containing`, `releases *`, `cache info`). Data commands (`download`, `places`, `buildings`, `roads`, `sample`, `at`, `gers`) already emit structured data and ignore it.\n\n## 5. Filter Syntax (`--where`)\n\n### 5.1 Grammar\n\n`--where KEY OP VALUE`, repeatable. Each flag is one comparison; multiple flags AND together.\n\n| Element | Form |\n|---|---|\n| `KEY` | Dot-path into the type's PyArrow schema (e.g. `categories.primary`, `names.primary`, `height`, `bbox.xmin`). |\n| `OP` | One of `=`, `!=`, `<`, `<=`, `>`, `>=`, `in`. |\n| `VALUE` | Auto-typed: integer, float, `true`/`false`, or string. For `in`: `[a,b,c]`. Quoting only required when value contains spaces or commas. |\n\n### 5.2 Translation\n\nEach `(KEY, OP, VALUE)` becomes a `pyarrow.compute.Expression`. The conjunction of all `--where` flags is passed to `_prepare_query` alongside the bbox filter. Filters push down to row-group level via existing PyArrow machinery where the column has Parquet statistics; the S3 read path is unchanged.\n\nList-valued fields (e.g. `categories.alternate`, which is `list`) are out of scope for `--where` in v1; agents filter on scalar fields like `categories.primary` instead. A `contains` operator on list fields can be added later without breaking existing usage.\n\n### 5.3 Validation\n\nBefore the network call: walk the type's schema and confirm every `KEY` resolves. On miss, error with the available field paths listed. This is the agent's primary safety net against misnamed columns.\n\n### 5.4 Examples\n\n```\n--where categories.primary=restaurant\n--where height>100\n--where \"names.primary in [Starbucks,Dunkin']\"\n--where class=motorway --where surface=paved\n```\n\n## 6. Geocoding\n\n### 6.1 Approach\n\nLazy on-disk index of Overture's `divisions/division` joined with `divisions/division_area` for polygon bbox.\n\n### 6.2 Build\n\n- Triggered automatically on the first command that needs it (`where`, `--in`, `containing`).\n- Reads the `division` and `division_area` partitions with column projection: `id`, `names.primary`, `names.common`, `subtype`, `class`, `country`, `region`, `admin_level`, `population`, `parent_division_id`, plus the polygon bbox from `division_area`.\n- Joined on the canonical `division \u2194 division_area` link (the foreign-key column on `division_area` referencing `division.id`; exact column name resolved by implementation against the live schema).\n- Writes one parquet file at `$XDG_CACHE_HOME/overturemaps/divisions-index-.parquet` (fallback `~/.cache/overturemaps/`). Expected size: 10\u201330 MB.\n\n### 6.3 Invalidation\n\n- Index file embeds the release ID in its filename.\n- Lookup compares cached release to `releases latest`; if different, rebuild.\n- `cache clear` removes the index.\n- `cache build` forces a rebuild against the current latest release.\n\n### 6.4 Lookup\n\n- Inputs: `\"Boston\"`, `\"Boston, MA\"`, `\"Boston, US\"`, `\"Boston, US-MA\"`. Comma-separated tokens after the name narrow by region or country code.\n- Match strategy: case-insensitive equality against `names.primary` and `names.common`. Substring match is **out of scope** for v1 \u2014 agents prefer exact behavior, and substring matches without ranking are noisy.\n- Disambiguation: best match by `admin_level` (innermost wins when both match) then `population` desc. If multiple `--in` results tie, the first by stable sort wins.\n- Reporting: the picked division prints to stderr; other matches listed. JSON mode includes a `candidates` array on `where`.\n\n### 6.5 Errors\n\n| Condition | Behavior |\n|---|---|\n| No match | Exit non-zero; in JSON mode `{\"error\":{\"code\":\"no_match\",\"message\":...,\"query\":\"\u2026\"}}`. |\n| Index build fails | Exit non-zero; clear, actionable message. |\n| Network unreachable on first build | Exit non-zero; suggest `--bbox` as fallback. |\n\n## 7. JSON Output Convention\n\nWhen `--json` is set on a metadata command:\n\n- Stdout is exactly one JSON document (no trailing newline required by spec, present in practice).\n- Stderr is silent unless there's an error.\n- Errors: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}` on stderr; non-zero exit.\n- Stable keys; new keys may be added but existing keys won't be removed without a major version bump.\n- Exit codes match the human-mode command.\n\n### 7.1 Output shapes\n\n| Command | Shape |\n|---|---|\n| `where` | Object with `name`, `subtype`, `country`, `region`, `bbox`, `population`, `id`, `admin_level`, `parent_division_id`, `candidates`. |\n| `count` | Object with `type`, `bbox`, `where`, `count`. |\n| `themes` | Array of `{name, description, types}`. |\n| `types` | Array of `{name, theme, description}`. |\n| `schema` | Object with `type`, `fields` (array of `{name, type, doc}`), `example` (one feature). |\n| `categories` | Array of `{value, count}` sorted by count desc. |\n| `capabilities` | Object with `version`, `commands` (each with `name`, `params`, `description`). |\n| `releases list` | Array of release strings, newest first. |\n| `releases latest` | Object with `release`. |\n| `cache info` | Object with `index_path`, `index_release`, `latest_release`, `up_to_date`, `size_bytes`. |\n| `containing` | Array of `{id, name, subtype, admin_level, country, region}`, innermost first. |\n\n## 8. Intent Verbs\n\nEach verb is a thin Click command that translates user input through `geocoding` and `filters`, then calls the existing `_prepare_query \u2192 record_batch_reader \u2192 copy` pipeline.\n\n- **`places`** \u2014 adds `-t place`. `--category VAL` desugars to `--where categories.primary=VAL`.\n- **`buildings`** \u2014 adds `-t building`.\n- **`roads`** \u2014 adds `-t segment` (not `connector`). `--class VAL` desugars to `--where class=VAL`.\n- **`at LAT,LON [-t TYPE]`** \u2014 `-t` defaults to `place`. Builds a small bbox around the point using a per-type radius (100 m for `place`, 50 m for `building`, 25 m for `address`; configurable via `--radius`). Reads features, sorts by haversine distance to the query point in Python, limits to N (default 10). Output format follows `-f` (default `geojsonseq` to stdout when no `-o`); same writer pipeline as `download`.\n- **`containing LAT,LON`** \u2014 uses the divisions index to find candidate divisions whose bbox contains the point, then loads each candidate's polygon (via the `division_area` shard hinted by the index row) and uses Shapely `contains` to filter to true contains. Emits results in order of decreasing `admin_level` (innermost first).\n\n## 9. Skill Installer + Skill Content\n\n### 9.1 Installer command\n\n`overturemaps install-skill`\n\nInteractive flow:\n\n1. Prompts (multi-select) for targets:\n - **Claude Code, user scope** \u2014 `~/.claude/skills/overturemaps/SKILL.md`\n - **Claude Code, project scope** \u2014 `./.claude/skills/overturemaps/SKILL.md`\n - **AGENTS.md** \u2014 `./AGENTS.md` (appends a clearly-delimited section if file exists)\n2. Confirms overwrite if a Claude target file already exists.\n3. For `AGENTS.md`: inserts content between `` and `` markers (creating the file if needed, replacing the marked block if the markers already exist).\n\nNon-interactive form for scripted installs:\n\n```\noverturemaps install-skill --target claude-user --target agents-md --yes\n```\n\n### 9.2 Skill content\n\nLives at `overturemaps/data/skill.md`. Same content drives both Claude SKILL.md output and AGENTS.md section output (with target-specific frontmatter wrapping). Sections:\n\n1. **Frontmatter (Claude target only).**\n - `name: overturemaps`\n - `description:` \u2014 tuned for high agent recall. Draft text:\n > *\"Use when a user's question or task involves places, buildings, roads, addresses, neighborhoods, or other geographic features \u2014 even if they don't use geo terms. Examples: 'how many coffee shops in SoHo', 'find hospitals in Brooklyn', 'show tall buildings in Manhattan', 'what neighborhoods make up Queens'.\"*\n\n2. **Trigger heuristics.** Concrete layperson phrasings that should fire the skill, and negative examples that look geospatial but aren't (e.g. \"draw a map of the org chart\").\n\n3. **Recipe catalog (~12 worked examples).** Each recipe shows a layperson question \u2192 the CLI calls \u2192 how to interpret the output. Patterns covered:\n - \"Where is X\" \u2192 `where`\n - \"How many X in Y\" \u2192 `where` + `count`\n - \"Show me X in Y\" \u2192 intent verb with `--in`\n - \"What's at this point\" \u2192 `at`\n - \"Which neighborhoods make up Y\" \u2192 `containing` + `where` of children\n - Chaining: `where --json` \u2192 extract bbox \u2192 feed to `download`\n - When to use `sample` before `download`\n - When to drop to raw `download -t` with `--where` for advanced filters\n\n4. **Schema cheatsheet.** Themes/types table + key properties:\n - `place` \u2192 `categories.primary`, `names.primary`, `confidence`, `addresses`\n - `building` \u2192 `height`, `num_floors`, `class`, `subtype`\n - `segment` \u2192 `class` (motorway/primary/\u2026), `subclass`, `surface`, `speed_limits`\n - `division` \u2192 `subtype` (country/region/county/locality/\u2026), `admin_level`, `population`\n - `address` \u2192 `street`, `number`, `postcode`, `country`\n\n5. **Anti-patterns.**\n - Don't download globally (no bbox, no `--in`).\n - Always `count` before downloading anything large.\n - Prefer `--where` push-down over post-filtering downloaded GeoJSON.\n - Don't invent place names not in Overture's divisions; use `where` first to verify.\n - Don't parse the human stdout \u2014 use `--json` for metadata commands.\n\n## 10. Module Organization\n\nNew files:\n\n- `overturemaps/geocoding.py` \u2014 `resolve(name) -> list[Division]`, `best_match(name) -> Division`, supporting types.\n- `overturemaps/cache.py` \u2014 `index_path(release)`, `ensure_index(release)`, `build_index(release)`, `clear()`, `info()`.\n- `overturemaps/filters.py` \u2014 `parse_where(field, op, value) -> pc.Expression`, schema-aware validation, `combine(filters) -> pc.Expression`.\n- `overturemaps/introspection.py` \u2014 `list_themes()`, `list_types()`, `get_schema(type_)`, `sample_feature(type_)`, `enumerate_categories(type_, bbox=None, top=None)`.\n- `overturemaps/intents.py` \u2014 shared helpers for the intent verbs (radius defaults, distance sort, etc.).\n- `overturemaps/skill_installer.py` \u2014 Claude-Code + AGENTS.md writers; reads from `data/skill.md`.\n- `overturemaps/data/skill.md` \u2014 Skill content (single source of truth).\n\n`cli.py` gains new commands but each remains thin (10\u201340 lines), all delegating to the modules above.\n\nPublic Python API additions in `overturemaps/__init__.py`: `resolve`, `count_rows` (already exists internally, exposed here), `enumerate_categories`. Existing exports unchanged.\n\n## 11. Backwards Compatibility\n\n- All existing commands + flags + outputs identical.\n- New flags on `download` are optional; default behavior unchanged.\n- `.state` sidecar format unchanged.\n- Public Python API: additions only, no removals or signature changes.\n- The CLI banner and `--help` output for existing commands stay byte-identical.\n\n## 12. Testing Requirements\n\n### 12.1 Unit\n\n- `filters.parse_where`: all 7 operators; auto-typing; `in` lists; schema-miss error path includes available fields.\n- `geocoding.best_match`: tie-break by admin_level then population; comma-suffix narrowing; case-insensitive match.\n- `cache`: build creates file at the right path; invalidation triggers on release change; `clear` removes file.\n- `introspection`: each listing helper returns the expected shape; `--json` output passes a strict schema check.\n- `intents`: `places --category X` desugars to the same query as `--where categories.primary=X`.\n- `skill_installer`: Claude target writes correct path; AGENTS.md target inserts between markers; non-interactive `--yes` works.\n\n### 12.2 Integration (network)\n\n- `where \"Boston, MA\"` returns a US-MA locality with `population > 100000`.\n- `count -t place --in \"Boston, MA\"` returns a positive integer.\n- `categories -t place --in \"Boston, MA\" --top 5` returns 5 plausible categories.\n- `at LAT,LON -t place` (with known coordinates) returns the expected nearby place.\n- `containing LAT,LON` for a known city center returns its locality, county, region, country in order.\n\n### 12.3 Smoke\n\n- `overturemaps --json capabilities` parses as JSON; every listed command has at least a name + description.\n- `overturemaps install-skill --target agents-md --yes` creates `AGENTS.md` in CWD with delimited content; second run replaces only the delimited block.\n\n## 13. Open Questions\n\n- Should `where` accept multiple results when ambiguity is genuine (e.g. `--all`)? Default is best-match; an `--all` flag could be added later without breaking anything.\n- Should `count` also report estimated download bytes (helpful for agents picking format)? Could be a v1.2 follow-up.\n- Should `capabilities` include a JSON Schema for each command's params? Useful for strict agent frameworks; deferable.\n\n## 14. Migration Plan\n\nThis change is additive. Rollout:\n\n1. Implement modules + commands behind the existing CLI group (no flag-gating needed \u2014 new commands are simply new).\n2. Update README to highlight the new commands (especially `where`, `places`, `install-skill`) at the top of the \"Usage\" section; existing examples stay below.\n3. Cut a minor release (`1.1.0`). Standalone binary build picks up new modules automatically.\n4. Announce the Skill / AGENTS.md installer in release notes \u2014 that's the primary signal to agents that this tool is available to them.\n", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md": "# Agent-Usability Eval for the Overture CLI \u2014 Design\n\n**Date:** 2026-05-28\n**Status:** Approved for planning\n\n## Problem\n\nThe Overture CLI was redesigned around a thesis (see\n`designing_cli_interfaces_for_data_products.md`): expose *question-shaped*\nverbs (`places`, `buildings`, `roads`, `addresses`, `at`, `containing`,\n`where`, `count`, `categories`, `schema`, `capabilities`) and treat\n`download` as the escape hatch for the four types that lack a convenience\nverb. We have no objective measurement of whether that thesis holds when a\nreal agent uses the CLI.\n\nThis eval measures an agent's ability to answer geospatial questions with\nthe CLI, and surfaces the two failure modes the redesign was meant to kill:\n\n1. **Unnecessary `download` fallback** \u2014 the agent reaches for `download`\n when a convenience verb already covers the question. Signals an\n affordance/communication failure: the right verb existed but wasn't\n discovered or trusted.\n2. **CLI errors** \u2014 wrong commands, bad flags, invalid category values,\n malformed coordinates, tracebacks. Signals a learnability failure.\n\nFailures are aggregated and synthesized into concrete proposed improvements\n(stderr hints, Skill edits, help wording, missing verbs/aliases).\n\n## Scope and key decisions\n\n- **Agent harness:** real Claude Code headless (`claude -p`), which\n auto-loads the bundled Overture Skill \u2014 the intended deployment.\n- **Model:** Sonnet is the default; a `--model` flag passes through to\n `claude -p` so a run can use Opus (or another model) when desired.\n- **Data backend:** live Overture S3, restricted to small queries (small\n bboxes / small named places) to keep downloads cheap and fast.\n- **Scoring:** process signals only (download usage + CLI errors +\n efficiency). No answer-correctness judging in v1; the final answer text is\n recorded so correctness can be layered in later without re-running.\n- **Synthesis:** LLM step that turns clustered failures into concrete,\n evidence-backed change proposals (text, not auto-applied).\n- **Trace capture:** hybrid \u2014 transcript for the agent's final answer and\n give-up signal, plus a `PATH` shim for clean command/error/download\n signals.\n- **Skill state:** Skill-installed only in v1 (no naked-CLI control arm).\n- **Scale (v1):** 10 questions \u00d7 2 repeats = 20 runs.\n\nOut of scope for v1: without-Skill control arm, answer-correctness scoring,\nmulti-model comparison, CI integration, auto-applied patches.\n\n## Architecture\n\nFive components under a new top-level `evals/` directory (distinct from\n`benchmarks/`, which is performance-focused). Standalone scripts, **not**\npytest \u2014 these are slow, networked, and cost money, so they are opt-in.\n\n```\nevals/\n questions.yaml # the question bank\n shim/overturemaps # PATH shim wrapping the real CLI (logs argv/exit/io)\n runner.py # drives claude -p per (question x repeat), captures runs\n score.py # normalizes traces -> per-run metric records\n synthesize.py # aggregates + LLM-proposes improvements\n runs/-/ # per-run artifacts (transcript, shim log, record)\n report.md # generated, human-readable, ranked\n proposals.json # generated, structured change proposals\n```\n\nA `just eval` recipe runs runner \u2192 score \u2192 synthesize.\n\n### 1. Question bank (`evals/questions.yaml`)\n\nHand-authored, question-shaped, tagged. Schema per entry:\n\n```yaml\n- id: coffee-brooklyn-count\n question: \"How many coffee shops are in Brooklyn?\"\n tier: 1 # 1..4, see below\n download_is_legitimate: false # true only when no verb covers the type\n target_type: place # expected Overture type for the answer\n notes: \"Ideal path: count -t place --in Brooklyn --category coffee_shop\"\n```\n\n`download_is_legitimate` separates two distinct signals \u2014 it does **not**\nexempt a download from scrutiny:\n\n- When `false`, a `download` is an **agent failure** (a verb existed and\n wasn't used).\n- When `true`, a `download` is not an agent failure but **is a coverage\n gap** \u2014 every legitimate download is a candidate for a future convenience\n verb, alias, or hint that would let the agent avoid `download` entirely.\n\nSo the eval records *all* download usage. Both classes flow into synthesis;\nthe goal is to drive total download usage toward zero, by fixing agent\nfailures (`false`) and by closing coverage gaps (`true`).\n\n**Complexity tiers** and the v1 set of 10 (2 per tier):\n\n- **T1 \u2014 single verb.**\n 1. \"How many coffee shops are in Brooklyn?\" (`count`/`places`)\n 2. \"Where is Boston, MA, and what is its bounding box?\" (`where`)\n- **T2 \u2014 discovery / filter needed.**\n 3. \"Find buildings taller than 150m in Manhattan.\" (`buildings --where height>150`)\n 4. \"What restaurant categories exist for places in Brooklyn?\" (`categories` \u2192 `places`)\n- **T3 \u2014 spatial / multi-step.**\n 5. \"What POIs are within 500m of 40.7128,-74.0060?\" (`at ... --radius 500`)\n 6. \"Which administrative areas contain 40.7128,-74.0060?\" (`containing`)\n- **T4 \u2014 legitimate escape hatch** (`download_is_legitimate: true`).\n 7. \"Get the water features in downtown Boston.\" (`download -t water`)\n 8. \"Get the land-use polygons for a small area of Brooklyn.\" (`download -t land_use`)\n- **T5 \u2014 compound / cross-layer.** Questions that combine multiple layers\n (places + roads/segments, places + places) plus a spatial relationship.\n Both layers in these questions are covered by convenience verbs, so the\n expected path is to fetch each layer with its verb (`places`, `roads`) and\n perform the spatial join in code \u2014 **not** drop to `download`. They are the\n hardest test of the download metric: `download_is_legitimate: false`, and a\n `download -t place`/`-t segment` fallback counts as a failure exactly as it\n does in T1\u2013T3. Scoring also weights *decomposition and verb-chaining*\n (error rate, wasted commands, completion). Each carries a `subtasks` list\n in its `notes` describing the expected verb-by-verb decomposition.\n 9. \"Find all the hardware stores within 200m of bike paths in Alameda\n County.\" (places `hardware_store` + roads/segments cycleways + 200m\n proximity join)\n 10. \"How many bus stops have a coffee shop within 100m in Williamsburg,\n Brooklyn?\" (places `bus_stop` + places `coffee_shop` + 100m proximity\n count)\n\nAll places/bboxes are deliberately small to bound download cost; the\ncompound questions use small named areas (Williamsburg) or accept that\ncounty-scale queries (Alameda County) are the most expensive in the set and\nsit at the edge of the cost guard.\n\n### 2. Runner (`evals/runner.py`)\n\nFor each (question \u00d7 repeat):\n\n1. Create an isolated temp working directory for outputs.\n2. Use a **pre-warmed shared divisions cache** so runs measure agent\n behavior, not one-time index-build time/failures. The runner warms the\n cache once before the batch.\n3. Put the **shim** first on `PATH` so every `overturemaps` invocation is\n logged with argv, exit code, stdout, and stderr.\n4. Invoke `claude -p \"\" --model --output-format\n stream-json` with bash permitted, in the Skill-installed environment.\n `` defaults to Sonnet and is overridable via the runner's\n `--model` flag (e.g. `--model opus`).\n5. Persist the transcript (stream-json) and the shim log to\n `evals/runs/-/`.\n\nRuns are independent; a single batch is 10 \u00d7 2 = 20 invocations.\n\n### 3. Trace capture (hybrid)\n\n- **Shim (`evals/shim/overturemaps`)** \u2014 a thin wrapper (~30 lines) that\n appends a JSON line per call: `{argv, exit_code, stdout, stderr,\n duration}`, then exec's the real CLI transparently (output passes through\n unchanged so the agent sees normal behavior). This is the schema-stable\n source of truth for command-level metrics.\n- **Transcript (stream-json)** \u2014 parsed for the agent's final answer text\n and whether it completed vs gave up. Used for `completed` and to attach\n the answer to the record; not relied on for command/error counting.\n\n### 4. Scorer (`evals/score.py`)\n\nNormalizes shim log + transcript into one record per run and computes\n**process metrics**:\n\n- `download_used` \u2014 used `download` at all (recorded for every run).\n- `unnecessary_download` \u2014 `download_used` while `download_is_legitimate`\n is `false` (an agent failure).\n- `legitimate_download` \u2014 `download_used` while `download_is_legitimate` is\n `true` (not an agent failure, but flagged as a coverage gap for synthesis,\n with the type(s) downloaded recorded).\n- `cli_error_count` and **error taxonomy** per failing call, classified from\n exit code + stderr patterns:\n - `unknown_command` (e.g. `No such command`)\n - `bad_option` (e.g. `no such option` / Click usage error)\n - `bad_category_value` (empty result + near-match hint, or invalid value)\n - `malformed_bbox_or_coords`\n - `wrong_type_for_question` (queried a type that can't answer it)\n - `traceback` (unhandled Python exception)\n- `recovered` \u2014 a later call succeeded after an error. The CLI's stderr\n hints are *meant* to enable recovery, so recovery is a positive signal;\n repeated unrecovered errors are the negative one.\n- `command_count`, `wasted_commands` (failed + redundant), `completed`.\n- `final_answer` (recorded, not scored).\n\nOutput: `evals/runs/-/record.json`.\n\n### 5. Synthesizer (`evals/synthesize.py`)\n\nAggregates all records, clusters failures by `(taxonomy \u00d7 question/tier)`,\nranks clusters by frequency \u00d7 severity, and runs an LLM step that converts\neach cluster into a **concrete, evidence-backed proposal** tied to the\noffending traces.\n\nIt treats **all** download usage as material \u2014 not just `unnecessary_download`.\nLegitimate downloads (`legitimate_download`, grouped by downloaded type) get\ntheir own synthesis pass that asks: *what would let the agent avoid this\ndownload?* \u2014 typically a new convenience verb for an uncovered type (e.g. a\n`water` or `land_use` verb), an alias, or a discovery hint. The aim is to\ndrive total download usage toward zero, so coverage gaps surface as\nfirst-class proposals alongside agent failures.\n\nExamples of proposal shapes:\n\n- \"2/2 runs guessed `--category cafe`; add `cafe`\u2192`coffee_shop` to the\n near-match hint.\"\n- \"Agents never discovered `containing`; add a spatial example to the\n Skill.\"\n- \"`download -t water` runs took N commands to find the type name; surface\n `types` more prominently.\"\n\nOutputs:\n\n- `evals/report.md` \u2014 ranked, human-readable, one section per failure\n cluster with example traces and the proposed change.\n- `evals/proposals.json` \u2014 structured proposals (cluster id, evidence run\n ids, target artifact, suggested change). Not auto-applied.\n\n## Data flow\n\n```\nquestions.yaml \u2500\u2510\n \u251c\u2500> runner.py \u2500\u2500> runs/-/{transcript, shim.log}\nshim + cache \u2500\u2500\u2500\u2518 \u2502\n v\n score.py \u2500\u2500> runs/-/record.json\n \u2502\n v\n synthesize.py \u2500\u2500> report.md + proposals.json\n```\n\n## Error handling\n\n- **Run-level failures** (claude CLI nonzero, timeout, network outage) are\n recorded as `run_status: error` and excluded from metric aggregation but\n listed in the report so they aren't silently dropped.\n- **Cache warm failure** aborts the batch with a clear message rather than\n letting every run fail on index build.\n- **Shim transparency:** the shim must pass through exit codes and\n stdout/stderr unchanged; a shim crash must not alter what the agent sees\n (fail open to the real CLI).\n- **Cost guard:** the runner refuses questions whose resolved bbox exceeds a\n configured area threshold, to prevent a malformed question from triggering\n a huge live download.\n\n## Testing strategy\n\n- Unit-test the scorer and taxonomy classifier against **recorded fixture\n traces** (saved shim logs + transcripts) \u2014 deterministic, no network.\n- Unit-test the shim's pass-through behavior (exit code, stdout, stderr\n preserved) against a fake CLI.\n- The runner and synthesizer are exercised by a single live smoke run\n (`just eval --smoke`, 1 question \u00d7 1 repeat), not by unit tests.\n\n## Success criteria\n\n- `just eval` produces `report.md` + `proposals.json` from a live 20-run\n batch.\n- The scorer correctly classifies every error in the fixture set.\n- The report ranks failure clusters and each cluster carries at least one\n example trace and one concrete proposal.\n", + "justfile": "#!/usr/bin/env just --justfile\n\nset windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]\n\nlatest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'`\n\n@_default:\n {{ just_executable() }} --list\n\n# Install all dependencies (including dev)\n[group('setup')]\ninstall:\n uv sync --dev\n\n# Run unit tests only (no network)\n[group('test')]\ntest:\n uv run pytest tests/ -m \"not integration\"\n\n# Run the full test suite including integration tests\n[group('test')]\ntest-all:\n uv run pytest tests/\n\n# Run a quick CLI smoke test against the Boston bounding box\n[group('test')]\nsmoke-test:\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type=building \\\n -o boston-smoke.geojson\n @echo \"Output written to boston-smoke.geojson\"\n\n# Run a smoke test for a given type (default: building)\n[group('test')]\n[arg('type', pattern='building|place|segment|connector|locality|locality_area|administrative_boundary|land|land_cover|land_use|water')]\nsmoke-test-type type='building':\n uv run botmap download \\\n --bbox=-71.068,42.353,-71.058,42.363 \\\n -f geojson \\\n --type={{ type }} \\\n -o boston-{{ type }}.geojson\n @echo \"Output written to boston-{{ type }}.geojson\"\n\n# Show the latest Overture release\n[group('release')]\nlatest:\n @echo {{ latest_release }}\n\n# List all available releases\n[group('release')]\nreleases:\n uv run botmap releases list\n\n# Build standalone binary for the current platform\n[group('build')]\nbuild-binary:\n uv sync --group binary\n uv run pyinstaller \\\n --onefile \\\n --name botmap \\\n --collect-all pyarrow \\\n --collect-all shapely \\\n --collect-data pyfiglet \\\n botmap/__main__.py\n\n# Build the package\n[group('build')]\nbuild:\n uv build\n\n# Run the agent-usability eval (live: drives claude -p against Overture S3)\n[group('eval')]\neval model=\"sonnet\":\n uv run python -m evals.runner --model {{ model }}\n uv run python -m evals.score\n uv run python -m evals.synthesize --model opus\n @echo \"Report: evals/report.md | Proposals: evals/proposals.json\"\n\n# Single-question eval smoke test (one run, sonnet)\n[group('eval')]\neval-smoke:\n uv run python -m evals.runner --smoke --model sonnet\n uv run python -m evals.score\n @echo \"Smoke run captured under evals/runs/\"\n", + "pyproject.toml": "[project]\nname = \"botmap\"\nversion = \"0.1.2\"\ndescription = \"Agent-first Python CLI for querying Overture Maps (overturemaps.org) data, built so LLM agents (and humans) can answer geospatial questions without GIS expertise. Forked from overturemaps-py.\"\nauthors = [\n {name = \"Jacob Wasserman\", email = \"jwasserman@meta.com\"},\n {name = \"Drew Breunig\", email = \"dbreunig@gmail.com\"},\n]\nlicense = \"MIT\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nkeywords = [\"geospatial\", \"mapping\", \"GIS\", \"geojson\", \"shapely\", \"parquet\", \"opendata\", \"overture\", \"maps\"]\ndependencies = [\n \"click>=8.3.0\",\n \"colorama>=0.4.6\",\n \"orjson>=3.9.0\",\n \"pyfiglet>=1.0.2\",\n \"pyarrow>=15.0.2\",\n \"shapely>=2.1.0\",\n # numpy is not directly imported in the codebase, but we include it as a dependency\n # because: (1) it's a natural companion to pyarrow and shapely for geospatial workflows,\n # (2) pyarrow has excellent numpy interop (.to_numpy(), pa.array(numpy_arr)),\n # (3) if this project evolves into a library, users will expect numpy for array operations,\n # (4) it's already a transitive dependency of geopandas when that optional extra is installed.\n # Keeping it signals that this package is ready for data science workflows.\n \"numpy>=1.26.4\",\n \"tqdm>=4.67.3\",\n]\n\n[project.urls]\nHomepage = \"https://overturemaps.org\"\nSource = \"https://github.com/OvertureMaps/overturemaps-py\"\nIssues = \"https://github.com/OvertureMaps/overturemaps-py/issues\"\n\n[project.optional-dependencies]\ngeopandas = [\"geopandas>=1.1.0\"]\n\n[project.scripts]\nbotmap = \"botmap.cli:cli\"\n\n[dependency-groups]\ndev = [\n \"pytest>=8.0.0\",\n \"pytest-mock>=3.11.0\",\n \"pytest-benchmark>=5.0.0\",\n \"pyyaml>=6.0.3\",\n]\nbinary = [\n \"pyinstaller>=6.0\",\n \"pyinstaller-hooks-contrib>=2024.10\",\n]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"botmap\"]\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n", + "pytest.ini": "[pytest]\n# Pytest configuration for overturemaps-py\n\n# Make the repo root importable so `import evals.*` resolves in tests\npythonpath = .\n\n# Test discovery patterns\npython_files = test_*.py bench_*.py\npython_classes = Test*\npython_functions = test_*\n\n# Markers for categorizing tests\nmarkers =\n integration: marks tests that require network access (deselect with '-m \"not integration\"')\n slow: marks tests as slow (deselect with '-m \"not slow\"')\n\n# Output options\naddopts =\n --verbose\n --strict-markers\n --tb=short\n -ra\n\n# Test paths\ntestpaths = tests benchmarks\n\n# Minimum Python version\nminversion = 7.0\n", + "tests/__init__.py": "# Tests for botmap package\n", + "tests/test_cache.py": "\"\"\"Tests for the divisions-index cache.\"\"\"\n\nimport os\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.cache import (\n cache_dir,\n index_path,\n cache_info,\n clear_cache,\n)\n\n\ndef test_cache_dir_respects_xdg(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert cache_dir() == tmp_path / \"botmap\"\n\n\ndef test_cache_dir_fallback_when_xdg_unset(monkeypatch, tmp_path):\n monkeypatch.delenv(\"XDG_CACHE_HOME\", raising=False)\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n expected = tmp_path / \".cache\" / \"botmap\"\n assert cache_dir() == expected\n\n\ndef test_index_path_includes_release(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n p = index_path(\"2025-12-17.0\")\n assert p.name == \"divisions-index-2025-12-17.0.parquet\"\n assert p.parent == tmp_path / \"botmap\"\n\n\ndef test_cache_info_when_no_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_path\"] == str(index_path(\"2025-12-17.0\"))\n assert info[\"index_release\"] is None\n assert info[\"latest_release\"] == \"2025-12-17.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == 0\n\n\ndef test_cache_info_with_stale_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n # Create a fake stale index file\n stale = index_path(\"2024-01-01.0\")\n stale.parent.mkdir(parents=True, exist_ok=True)\n stale.write_bytes(b\"hello world\")\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"index_release\"] == \"2024-01-01.0\"\n assert info[\"up_to_date\"] is False\n assert info[\"size_bytes\"] == len(b\"hello world\")\n\n\ndef test_cache_info_with_current_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n current = index_path(\"2025-12-17.0\")\n current.parent.mkdir(parents=True, exist_ok=True)\n current.write_bytes(b\"x\" * 100)\n\n info = cache_info(latest_release=\"2025-12-17.0\")\n assert info[\"up_to_date\"] is True\n assert info[\"index_release\"] == \"2025-12-17.0\"\n assert info[\"size_bytes\"] == 100\n\n\ndef test_clear_removes_all_index_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n a = index_path(\"2024-01-01.0\")\n b = index_path(\"2025-12-17.0\")\n a.parent.mkdir(parents=True, exist_ok=True)\n a.write_bytes(b\"a\")\n b.write_bytes(b\"b\")\n\n removed = clear_cache()\n assert removed == 2\n assert not a.exists()\n assert not b.exists()\n\n\ndef test_clear_when_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n assert clear_cache() == 0\n\n\nimport pyarrow as pa\n\n\nclass _FakeArrowFn:\n \"\"\"Hold the return value the fake will produce.\"\"\"\n\n def __init__(self, return_value):\n self.return_value = return_value\n self.calls: list = []\n\n def __call__(self, *args, **kwargs):\n self.calls.append((args, kwargs))\n return self.return_value\n\n\ndef _fake_division_table():\n # names.common matches the real Overture schema: map.\n # All entries are None here to keep the fixture simple; the integration\n # test exercises real map values against S3 data.\n names_type = pa.struct([\n (\"primary\", pa.string()),\n (\"common\", pa.map_(pa.string(), pa.string())),\n ])\n bbox_type = pa.struct([\n (\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64()),\n ])\n return pa.table({\n \"id\": [\"d1\", \"d2\", \"d3\", \"d4\"],\n \"names\": pa.array(\n [\n {\"primary\": \"Boston\", \"common\": None},\n {\"primary\": \"Cambridge\", \"common\": None},\n {\"primary\": \"Boston\", \"common\": None},\n # d4: a microhood with only a point geometry \u2014 no division_area row\n {\"primary\": \"Williamsburg\", \"common\": None},\n ],\n type=names_type,\n ),\n \"subtype\": [\"locality\", \"locality\", \"locality\", \"microhood\"],\n \"class\": [None, None, None, None],\n \"country\": [\"US\", \"US\", \"GB\", \"US\"],\n \"region\": [\"US-MA\", \"US-MA\", \"GB-LIN\", \"US-NY\"],\n \"admin_level\": [8, 8, 8, None],\n \"population\": [654776, 118000, 41000, None],\n \"parent_division_id\": [\"mass\", \"mass\", \"lincolnshire\", \"brooklyn\"],\n # The division's own bbox (point-geometry for d4)\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n {\"xmin\": -73.9535, \"ymin\": 40.7146, \"xmax\": -73.9535, \"ymax\": 40.7146},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef _fake_division_area_table():\n bbox_type = pa.struct(\n [(\"xmin\", pa.float64()), (\"ymin\", pa.float64()),\n (\"xmax\", pa.float64()), (\"ymax\", pa.float64())]\n )\n return pa.table({\n # Only d1\u2013d3 have area polygons; d4 (microhood) has none.\n \"division_id\": [\"d1\", \"d2\", \"d3\"],\n \"bbox\": pa.array(\n [\n {\"xmin\": -71.19, \"ymin\": 42.23, \"xmax\": -70.99, \"ymax\": 42.40},\n {\"xmin\": -71.16, \"ymin\": 42.36, \"xmax\": -71.07, \"ymax\": 42.42},\n {\"xmin\": 0.00, \"ymin\": 53.00, \"xmax\": 0.20, \"ymax\": 53.10},\n ],\n type=bbox_type,\n ),\n })\n\n\ndef test_build_index_writes_joined_parquet(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n\n # Stub out the S3 reads\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n if type_ == \"division\":\n return div_table.select(columns)\n if type_ == \"division_area\":\n return area_table.select(columns)\n raise AssertionError(f\"unexpected type {type_}\")\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n assert out_path.exists()\n assert out_path == cache_mod.index_path(\"2025-12-17.0\")\n\n import pyarrow.parquet as pq\n table = pq.read_table(out_path)\n # All 4 rows present \u2014 including the microhood with no division_area\n assert table.num_rows == 4\n assert set(table.column_names) >= {\n \"id\", \"name_primary\", \"subtype\", \"country\",\n \"region\", \"admin_level\", \"population\", \"parent_division_id\",\n \"bbox_xmin\", \"bbox_ymin\", \"bbox_xmax\", \"bbox_ymax\",\n }\n assert \"name_common\" not in table.column_names\n # own_* helpers must be dropped from the final output\n assert \"own_xmin\" not in table.column_names\n\n\ndef test_build_index_point_division_uses_own_bbox_with_buffer(monkeypatch, tmp_path):\n \"\"\"A microhood with no division_area gets its point bbox buffered by ~1 km.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d4\")).to_pydict()\n\n # Point was at -73.9535, 40.7146; buffer of 0.009 deg should be applied.\n assert rows[\"bbox_xmin\"] == pytest.approx([-73.9535 - 0.009])\n assert rows[\"bbox_ymin\"] == pytest.approx([40.7146 - 0.009])\n assert rows[\"bbox_xmax\"] == pytest.approx([-73.9535 + 0.009])\n assert rows[\"bbox_ymax\"] == pytest.approx([40.7146 + 0.009])\n\n\ndef test_build_index_polygon_division_not_buffered(monkeypatch, tmp_path):\n \"\"\"Divisions with a real area polygon must not be expanded by the point buffer.\"\"\"\n from botmap import cache as cache_mod\n import pyarrow.parquet as pq\n import pyarrow.compute as pc\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n div_table = _fake_division_table()\n area_table = _fake_division_area_table()\n\n def fake_read_partition(theme, type_, release, columns):\n return div_table.select(columns) if type_ == \"division\" else area_table.select(columns)\n\n monkeypatch.setattr(cache_mod, \"_read_partition_columns\", fake_read_partition)\n out_path = cache_mod.build_index(\"2025-12-17.0\")\n\n table = pq.read_table(out_path)\n rows = table.filter(pc.equal(table.column(\"id\"), \"d1\")).to_pydict()\n assert rows[\"bbox_xmin\"] == pytest.approx([-71.19])\n assert rows[\"bbox_xmax\"] == pytest.approx([-70.99])\n\n\ndef test_ensure_index_skips_when_current(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n target = cache_mod.index_path(\"2025-12-17.0\")\n target.parent.mkdir(parents=True, exist_ok=True)\n target.write_bytes(b\"fake index\")\n\n called = []\n monkeypatch.setattr(\n cache_mod, \"build_index\",\n lambda release: called.append(release) or target,\n )\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == target\n assert called == [] # no rebuild\n\n\ndef test_ensure_index_rebuilds_when_stale(monkeypatch, tmp_path):\n from botmap import cache as cache_mod\n\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n old = cache_mod.index_path(\"2024-01-01.0\")\n old.parent.mkdir(parents=True, exist_ok=True)\n old.write_bytes(b\"old index\")\n\n called = []\n def fake_build(release):\n called.append(release)\n p = cache_mod.index_path(release)\n p.write_bytes(b\"new index\")\n return p\n\n monkeypatch.setattr(cache_mod, \"build_index\", fake_build)\n\n result = cache_mod.ensure_index(\"2025-12-17.0\")\n assert result == cache_mod.index_path(\"2025-12-17.0\")\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cache_integration.py": "\"\"\"Integration tests for cache: hit real S3, build a real index.\"\"\"\n\nimport pytest\n\nfrom botmap.cache import build_index, index_path\nfrom botmap.core import get_latest_release\n\npytestmark = pytest.mark.integration\n\n\ndef test_build_real_index(tmp_path, monkeypatch):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n release = get_latest_release()\n p = build_index(release)\n assert p == index_path(release)\n assert p.stat().st_size > 0\n\n import pyarrow.parquet as pq\n t = pq.read_table(p)\n # Should contain at least one country-level entry\n assert t.num_rows > 100\n assert \"bbox_xmin\" in t.column_names\n", + "tests/test_changelog.py": "\"\"\"Tests for the changelog module.\"\"\"\n\nimport pytest\nfrom botmap.changelog import query_changelog_ids, summarize_changelog\nfrom botmap.models import BBox\nfrom botmap.releases import get_latest_release\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids():\n \"\"\"Test querying changelog IDs for a small bbox.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in Austin, TX\n bbox = BBox(xmin=-97.75, ymin=30.25, xmax=-97.74, ymax=30.26)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Result should be a dict\n assert isinstance(changes, dict)\n\n # All values should be sets of strings\n for change_type, ids in changes.items():\n assert isinstance(ids, set)\n for id_ in ids:\n assert isinstance(id_, str)\n\n\n@pytest.mark.integration\ndef test_query_changelog_ids_empty_bbox():\n \"\"\"Test querying changelog with a bbox that has no changes.\"\"\"\n latest = get_latest_release()\n\n # Use a small bbox in the middle of the ocean (should have no changes)\n bbox = BBox(xmin=0.0, ymin=0.0, xmax=0.001, ymax=0.001)\n\n changes = query_changelog_ids(latest, \"buildings\", \"building\", bbox)\n\n # Should be empty or contain only empty sets\n for ids in changes.values():\n assert len(ids) == 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog():\n \"\"\"Test summarizing changelog for a theme.\"\"\"\n latest = get_latest_release()\n\n # Summarize for buildings theme\n results = summarize_changelog(latest, theme=\"buildings\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n\n # Should have building and building_part types\n types_data = results[\"buildings\"]\n assert isinstance(types_data, dict)\n\n # Each type should have change counts\n for type_name, change_counts in types_data.items():\n assert isinstance(change_counts, dict)\n # Change counts should be integers\n for change_type, count in change_counts.items():\n assert isinstance(change_type, str)\n assert isinstance(count, int)\n assert count >= 0\n\n\n@pytest.mark.integration\ndef test_summarize_changelog_single_type():\n \"\"\"Test summarizing changelog for a single type.\"\"\"\n latest = get_latest_release()\n\n # Summarize for building type only\n results = summarize_changelog(latest, theme=\"buildings\", type_=\"building\")\n\n assert isinstance(results, dict)\n assert \"buildings\" in results\n assert \"building\" in results[\"buildings\"]\n\n change_counts = results[\"buildings\"][\"building\"]\n assert isinstance(change_counts, dict)\n\n # Should have some change types\n assert len(change_counts) > 0\n", + "tests/test_cli_at.py": "\"\"\"Tests for the `at` command.\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _features_reader(rows):\n \"\"\"Build a one-shot RecordBatchReader from a list of dicts.\"\"\"\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n return _Reader(schema, rows)\n\n\nclass _Reader:\n def __init__(self, schema, rows):\n self.schema = schema\n self._rows = rows\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(self._rows, schema=self.schema)\n\n\ndef test_at_sorts_by_distance(monkeypatch, tmp_path):\n \"\"\"`at` should keep the N closest features, sorted by distance ascending.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n # Three points: the third is closest, the first is farthest.\n pts = [\n (\"p_far\", \"Far Cafe\", shapely.wkb.dumps(Point(-71.060, 42.360))),\n (\"p_mid\", \"Mid Cafe\", shapely.wkb.dumps(Point(-71.061, 42.360))),\n (\"p_near\", \"Near Cafe\", shapely.wkb.dumps(Point(-71.0615, 42.360))),\n ]\n rows = [{\"id\": pid, \"name\": name, \"geometry\": wkb}\n for pid, name, wkb in pts]\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader(rows))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"2\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 2\n # First line should be the nearest feature\n assert '\"id\":\"p_near\"' in lines[0]\n assert '\"id\":\"p_mid\"' in lines[1]\n\n\ndef test_at_passes_where_filters(monkeypatch, tmp_path):\n \"\"\"`at --where` should parse expressions and forward them to the reader.\"\"\"\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _features_reader([])\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\", \"-t\", \"place\", \"-n\", \"5\",\n \"--where\", \"categories.primary=coffee_shop\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n f = captured[\"where_filters\"][0]\n assert f.key == \"categories.primary\"\n assert f.op == \"=\"\n assert f.value == \"coffee_shop\"\n\n\ndef test_at_invalid_where_errors(monkeypatch):\n \"\"\"`at --where` with an invalid expression should fail cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _features_reader([]))\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"42.360,-71.0617\",\n \"--where\", \"this is not a filter\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_cache.py": "\"\"\"Tests for the `cache` command group.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_cache_info_empty(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"cache\", \"info\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"latest_release\"] == \"2025-12-17.0\"\n assert data[\"up_to_date\"] is False\n assert data[\"index_release\"] is None\n\n\ndef test_cache_clear_removes_files(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n from botmap.cache import index_path\n p = index_path(\"2025-12-17.0\")\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"x\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"clear\"])\n assert result.exit_code == 0\n assert not p.exists()\n assert \"1\" in result.output or \"Removed\" in result.output\n\n\ndef test_cache_build_invokes_build_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n called = []\n def fake_build(release):\n called.append(release)\n from botmap.cache import index_path\n p = index_path(release)\n p.parent.mkdir(parents=True, exist_ok=True)\n p.write_bytes(b\"built\")\n return p\n monkeypatch.setattr(\"botmap.cli.build_index\", fake_build)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"cache\", \"build\"])\n assert result.exit_code == 0, result.output\n assert called == [\"2025-12-17.0\"]\n", + "tests/test_cli_capabilities.py": "\"\"\"Tests for the `capabilities` command.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_capabilities_json_structure():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert \"version\" in data\n assert \"commands\" in data\n cmd_names = {c[\"name\"] for c in data[\"commands\"]}\n # Spot check: a few expected commands are present\n for expected in (\"download\", \"where\", \"count\", \"themes\", \"types\",\n \"schema\", \"categories\", \"capabilities\"):\n assert expected in cmd_names, f\"missing command {expected}\"\n\n\ndef test_capabilities_command_has_params():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"capabilities\"])\n data = json.loads(result.output)\n download = next(c for c in data[\"commands\"] if c[\"name\"] == \"download\")\n param_names = {p[\"name\"] for p in download[\"params\"]}\n assert \"type_\" in param_names or \"type\" in param_names\n assert \"bbox\" in param_names\n assert \"in_place\" in param_names or \"in\" in param_names\n assert \"where_exprs\" in param_names or \"where\" in param_names\n", + "tests/test_cli_categories.py": "\"\"\"Tests for the `categories` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_categories_returns_top_values(monkeypatch):\n \"\"\"Stub a reader that yields a batch with category values; verify top-N counting.\"\"\"\n\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n rows = (\n [{\"categories\": {\"primary\": \"restaurant\"}}] * 10 +\n [{\"categories\": {\"primary\": \"cafe\"}}] * 7 +\n [{\"categories\": {\"primary\": \"bar\"}}] * 3 +\n [{\"categories\": {\"primary\": \"hotel\"}}] * 1\n )\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(rows, schema=schema)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\", \"--top\", \"3\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data == [\n {\"value\": \"restaurant\", \"count\": 10},\n {\"value\": \"cafe\", \"count\": 7},\n {\"value\": \"bar\", \"count\": 3},\n ]\n\n\ndef test_categories_non_place_type_with_verb_gives_helpful_error(monkeypatch):\n \"\"\"`categories -t land_use` should explain `class` and point to the verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"land_use\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"class\" in result.output\n assert \"landuse\" in result.output\n assert \"schema\" in result.output\n\n\ndef test_categories_non_place_type_without_verb_gives_schema_hint(monkeypatch):\n \"\"\"`categories -t infrastructure` should point to schema.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"categories\", \"-t\", \"infrastructure\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code != 0\n assert \"schema\" in result.output\n", + "tests/test_cli_containing.py": "\"\"\"Tests for the `containing` command.\"\"\"\n\nimport json\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef _write_index(tmp_path):\n \"\"\"Write a fake divisions index with three nested divisions.\"\"\"\n table = pa.table({\n \"id\": [\"us\", \"ma\", \"boston\"],\n \"name_primary\": [\"United States\", \"Massachusetts\", \"Boston\"],\n \"subtype\": [\"country\", \"region\", \"locality\"],\n \"class\": [None, None, None],\n \"country\": [\"US\", \"US\", \"US\"],\n \"region\": [None, \"US-MA\", \"US-MA\"],\n \"admin_level\": [2, 4, 8],\n \"population\": [330000000, 7000000, 654776],\n \"parent_division_id\": [None, \"us\", \"ma\"],\n # All three bboxes contain Boston's downtown\n \"bbox_xmin\": [-180.0, -73.5, -71.19],\n \"bbox_ymin\": [18.0, 41.2, 42.23],\n \"bbox_xmax\": [-66.0, -69.9, -70.99],\n \"bbox_ymax\": [71.0, 42.9, 42.40],\n })\n p = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n p.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, p)\n\n\ndef test_containing_returns_innermost_first(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n # We stub _polygon_contains and _prefetch_polygons so the test doesn't hit S3.\n monkeypatch.setattr(\n \"botmap.cli._polygon_contains\",\n lambda division_id, lon, lat, candidate_bbox=None, geometry_wkb=None: True,\n )\n monkeypatch.setattr(\n \"botmap.cli._prefetch_polygons\",\n lambda division_ids, lon, lat, release: None,\n )\n\n _write_index(tmp_path)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"containing\", \"42.360,-71.060\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n # Innermost (highest admin_level) first\n assert data[0][\"subtype\"] == \"locality\"\n assert data[1][\"subtype\"] == \"region\"\n assert data[2][\"subtype\"] == \"country\"\n", + "tests/test_cli_count.py": "\"\"\"Tests for the `count` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\ndef test_count_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n assert \"12345\" in result.output or \"12,345\" in result.output\n\n\ndef test_count_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\",\n lambda *a, **k: 12345)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"building\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n ])\n assert result.exit_code == 0\n payload = json.loads(result.output)\n assert payload[\"count\"] == 12345\n assert payload[\"type\"] == \"building\"\n assert payload[\"bbox\"] == [-71.1, 42.3, -71.0, 42.4]\n\n\ndef test_count_with_in_and_where(monkeypatch):\n captured = {}\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"x\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.2, 42.2, -71.0, 42.4),\n )],\n )\n\n def fake_count(type_, bbox=None, release=None, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = kwargs.get(\"where_filters\")\n return 42\n\n monkeypatch.setattr(\"botmap.cli.count_rows\", fake_count)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"count\", \"-t\", \"building\", \"--in\", \"Boston, MA\",\n \"--where\", \"height>100\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-71.2, 42.2, -71.0, 42.4]\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n", + "tests/test_cli_download.py": "\"\"\"Tests for download CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import (\n BboxParamType,\n _bbox_area_sq_deg,\n cli,\n)\n\n\nclass _DummyWriter:\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, value, traceback):\n return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_download_hints_verb_for_covered_type(monkeypatch):\n \"\"\"`download -t place` should nudge toward the friendlier `places` verb.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"place\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"places\" in result.output\n assert \"Tip\" in result.output\n\n\ndef test_download_infrastructure_hint_points_to_places(monkeypatch):\n \"\"\"infrastructure downloads get a hint that transit stops are place features.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"infrastructure\",\n \"--bbox\", \"-71.07,42.35,-71.06,42.36\",\n ])\n assert result.exit_code == 0, result.output\n assert \"bus_stop\" in result.output\n assert \"places\" in result.output\n\n\ndef test_download_hint_is_actionable_command(monkeypatch):\n \"\"\"Hint for a covered type shows a concrete runnable command, not just --help.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *a, **k: _DummyReader()\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"segment\",\n \"--in\", \"Alameda County, CA\",\n \"--where\", \"class=cycleway\",\n ])\n assert result.exit_code == 0, result.output\n assert \"botmap roads\" in result.output\n assert \"--in\" in result.output\n assert \"--class cycleway\" in result.output\n assert \"--help\" not in result.output\n\n\ndef test_download_division_area_redirect(monkeypatch):\n \"\"\"division_area downloads now raise a UsageError pointing to `boundary`.\"\"\"\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"download\", \"-f\", \"geojsonseq\", \"-t\", \"division_area\",\n \"--in\", \"Alameda County, CA\",\n ])\n assert result.exit_code == 2, result.output\n assert \"boundary\" in result.output\n assert \"not downloadable\" in result.output\n\n\ndef test_download_saves_absolute_output_path(monkeypatch):\n \"\"\"`download` stores absolute output path in saved state.\"\"\"\n\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n def _fake_save_state(state, state_path):\n captured[\"state\"] = state\n captured[\"state_path\"] = state_path\n\n monkeypatch.setattr(\"botmap.cli.save_state\", _fake_save_state)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"-o\",\n \"relative-output.geojson\",\n ],\n )\n\n assert result.exit_code == 0\n assert \"state\" in captured\n assert captured[\"state\"].bbox is None\n assert captured[\"state\"].output == str(\n Path(\"relative-output.geojson\").resolve()\n )\n\n\n# --- BboxParamType validation tests ---\n\n\nclass TestBboxParamType:\n \"\"\"Tests for BboxParamType.convert() error messages.\"\"\"\n\n def _convert(self, value):\n \"\"\"Helper: invoke the param type's convert method.\"\"\"\n param_type = BboxParamType()\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-f\", \"geojson\", \"-t\", \"building\", \"--bbox\", value],\n )\n return result\n\n def test_valid_bbox(self):\n param_type = BboxParamType()\n result = param_type.convert(\"-71.10,42.34,-71.05,42.36\", None, None)\n assert result == [-71.10, 42.34, -71.05, 42.36]\n\n def test_wrong_number_of_values(self):\n result = self._convert(\"1,2,3\")\n assert result.exit_code != 0\n assert \"exactly 4 values\" in result.output\n\n def test_non_numeric_values(self):\n result = self._convert(\"a,b,c,d\")\n assert result.exit_code != 0\n assert \"must be numbers\" in result.output\n\n def test_longitude_out_of_range(self):\n result = self._convert(\"-200,42,-71,43\")\n assert result.exit_code != 0\n assert \"Longitude\" in result.output\n assert \"-180\" in result.output\n\n def test_latitude_out_of_range(self):\n result = self._convert(\"-71,-100,-70,42\")\n assert result.exit_code != 0\n assert \"Latitude\" in result.output\n assert \"-90\" in result.output\n\n def test_swapped_xmin_xmax(self):\n result = self._convert(\"10,42,-10,43\")\n assert result.exit_code != 0\n assert \"xmin\" in result.output\n assert \"xmax\" in result.output\n\n def test_swapped_ymin_ymax(self):\n result = self._convert(\"-71,43,-70,42\")\n assert result.exit_code != 0\n assert \"ymin\" in result.output\n assert \"ymax\" in result.output\n\n def test_example_shown_in_error(self):\n \"\"\"Error messages should include a usage example.\"\"\"\n result = self._convert(\"1,2,3\")\n assert \"Example\" in result.output or \"--bbox\" in result.output\n\n\n# --- Area helper ---\n\n\ndef test_bbox_area_sq_deg():\n assert _bbox_area_sq_deg(0, 0, 10, 10) == 100.0\n assert _bbox_area_sq_deg(-180, -90, 180, 90) == pytest.approx(64800.0)\n\n\n# --- Large bbox warning in download command ---\n\n\ndef test_download_warns_on_large_bbox(monkeypatch):\n \"\"\"download should warn when bbox is very large.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-180,-90,180,90\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"1.2 TB\" in result.output\n assert \"400 GB\" in result.output\n\n\ndef test_download_warns_on_no_bbox(monkeypatch):\n \"\"\"download should warn when no bbox is provided.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" in result.output\n assert \"No bounding box\" in result.output\n assert \"1.2 TB\" in result.output\n\n\ndef test_download_no_warning_on_small_bbox(monkeypatch):\n \"\"\"download should not warn when bbox is small.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2024-11-13.0\")\n\n monkeypatch.setattr(\n \"botmap.cli.record_batch_reader\", lambda *args, **kwargs: _DummyReader()\n )\n monkeypatch.setattr(\n \"botmap.cli.get_writer\", lambda *args, **kwargs: _DummyWriter()\n )\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *args, **kwargs: None)\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--bbox\",\n \"-71.10,42.34,-71.05,42.36\",\n ],\n )\n assert result.exit_code == 0\n assert \"Warning\" not in result.output\n\n\ndef test_download_invalid_release_explains_retention_policy(monkeypatch):\n \"\"\"download --release with an old release should explain the retention policy.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.get_available_releases\",\n lambda: ([\"2026-03-18.0\", \"2026-02-18.0\"], \"2026-03-18.0\"),\n )\n\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\n \"download\",\n \"-f\",\n \"geojson\",\n \"-t\",\n \"building\",\n \"--release\",\n \"2024-07-22.0\",\n ],\n )\n assert result.exit_code != 0\n assert \"no longer available\" in result.output\n assert \"GDPR\" in result.output\n assert \"60 days\" in result.output\n assert \"2026-03-18.0\" in result.output\n assert \"docs.overturemaps.org/release-calendar\" in result.output\n\n\ndef test_download_with_in_flag_resolves_to_bbox(monkeypatch):\n \"\"\"`--in` resolves a place to a bbox and feeds it through the pipeline.\"\"\"\n from botmap.geocoding import Division\n\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, *args, **kwargs):\n captured[\"bbox\"] = bbox\n captured[\"type\"] = type_\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston, MA\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"query\"] == \"Boston, MA\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_download_rejects_in_and_bbox_together():\n \"\"\"`--in` and `--bbox` are mutually exclusive.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--in\", \"Boston\", \"--bbox\", \"-71,42,-70,43\"],\n )\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output.lower() or \"cannot be used together\" in result.output.lower()\n\n\ndef test_download_with_where_passes_filter_to_reader(monkeypatch):\n \"\"\"`--where` is parsed and passed alongside the bbox filter.\"\"\"\n captured = {}\n\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, bbox, release, ct, rt, stac, where_filters=None):\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n # We're going to overwrite record_batch_reader to accept the new kwarg.\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"--where\", \"height>50\"],\n )\n assert result.exit_code == 0, result.output\n assert captured[\"where_filters\"] is not None\n assert len(captured[\"where_filters\"]) == 1\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 50\n\n\ndef test_download_malformed_where_clean_error():\n \"\"\"A malformed --where expression yields a clean UsageError, not a traceback.\"\"\"\n runner = CliRunner()\n result = runner.invoke(\n cli,\n [\"download\", \"-t\", \"building\", \"-f\", \"geojson\",\n \"-o\", \"out.geojson\", \"--bbox\", \"-71,42,-70,43\",\n \"--where\", \"just_a_key\"],\n )\n assert result.exit_code != 0\n # The error message comes from parse_where_expr's ValueError\n assert \"has no operator\" in result.output\n", + "tests/test_cli_gers.py": "\"\"\"Tests for GERS CLI argument validation.\"\"\"\n\nimport click\nimport pytest\n\nfrom botmap.cli import validate_gers_id\n\n\ndef test_validate_gers_id_valid_uuid():\n result = validate_gers_id(None, None, \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_normalizes_uppercase():\n \"\"\"uuid.UUID normalizes uppercase input to lowercase.\"\"\"\n result = validate_gers_id(None, None, \"0B7FC702-5B1C-4BF2-ABC1-B8F3B6AE2E76\")\n assert result == \"0b7fc702-5b1c-4bf2-abc1-b8f3b6ae2e76\"\n\n\ndef test_validate_gers_id_empty_raises():\n with pytest.raises(click.BadParameter, match=\"cannot be empty\"):\n validate_gers_id(None, None, \"\")\n\n\ndef test_validate_gers_id_not_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"not-a-uuid\")\n\n\ndef test_validate_gers_id_partial_uuid_raises():\n with pytest.raises(click.BadParameter, match=\"valid UUID\"):\n validate_gers_id(None, None, \"0b7fc702-5b1c\")\n", + "tests/test_cli_install_skill.py": "\"\"\"Tests for the `install-skill` CLI command.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_install_skill_non_interactive_claude_user(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"claude-user\", \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n expected = tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert expected.exists()\n\n\ndef test_install_skill_multiple_targets(tmp_path, monkeypatch):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"install-skill\",\n \"--target\", \"claude-user\",\n \"--target\", \"agents-md\",\n \"--yes\",\n ])\n assert result.exit_code == 0, result.output\n assert (tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\").exists()\n\n\ndef test_install_skill_rejects_unknown_target():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"install-skill\", \"--target\", \"not-a-target\", \"--yes\",\n ])\n assert result.exit_code != 0\n", + "tests/test_cli_integration.py": "\"\"\"Integration smoke tests for the new agent-facing commands.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\npytestmark = pytest.mark.integration\n\n\ndef test_where_boston_ma():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, US-MA\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"region\"] == \"US-MA\"\n assert data[\"subtype\"] == \"locality\"\n assert data[\"population\"] > 100_000\n xmin, ymin, xmax, ymax = data[\"bbox\"]\n assert -72 < xmin < -70 and 41 < ymin < 43\n\n\ndef test_count_places_in_boston():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"count\", \"-t\", \"place\", \"--in\", \"Boston, US-MA\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"count\"] > 100\n\n\ndef test_categories_in_boston_top_5():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"--json\", \"categories\", \"-t\", \"place\",\n \"--in\", \"Boston, US-MA\", \"--top\", \"5\",\n ])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 5\n for row in data:\n assert row[\"count\"] > 0\n assert isinstance(row[\"value\"], str)\n\n\ndef test_at_nearby_place():\n # Empire State Building\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"at\", \"40.7484,-73.9857\", \"-t\", \"place\", \"-n\", \"3\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code == 0, result.output\n lines = [l for l in result.output.strip().split(\"\\n\") if l.startswith(\"{\")]\n assert 1 <= len(lines) <= 3\n\n\ndef test_containing_known_point():\n # A point in central Boston\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"containing\", \"42.3601,-71.0589\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n subtypes = [d[\"subtype\"] for d in data]\n assert \"country\" in subtypes\n assert \"region\" in subtypes or \"locality\" in subtypes\n # Innermost-first ordering; admin_level may be None for neighborhoods\n levels = [d[\"admin_level\"] or 0 for d in data]\n assert levels == sorted(levels, reverse=True)\n", + "tests/test_cli_intents_addresses.py": "\"\"\"Tests for the `addresses` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"alameda\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_addresses_with_street_substring(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--street\", \"Fountain\", \"--number\", \"1208\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"address\"\n assert captured[\"bbox\"] == [-122.34, 37.71, -122.21, 37.79]\n streets = [f for f in captured[\"where_filters\"] if f.key == \"street\"]\n assert len(streets) == 1\n assert streets[0].op == \"~\"\n assert streets[0].value == \"Fountain\"\n numbers = [f for f in captured[\"where_filters\"] if f.key == \"number\"]\n assert len(numbers) == 1\n assert numbers[0].op == \"=\"\n assert numbers[0].value == \"1208\"\n\n\ndef test_addresses_with_bbox_and_postcode(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"--postcode\", \"94501\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"bbox\"] == [-122.3, 37.7, -122.2, 37.8]\n codes = [f for f in captured[\"where_filters\"] if f.key == \"postcode\"]\n assert codes and codes[0].value == \"94501\"\n\n\ndef test_addresses_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--street\", \"Fountain\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_addresses_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, US-CA\",\n \"--bbox\", \"-122.3,37.7,-122.2,37.8\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_addresses_ambiguous_in_emits_stderr_warning(monkeypatch):\n \"\"\"Two candidates -> stderr warning naming both and pointing to `where --all`.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"addresses\", \"--in\", \"Alameda, CA\",\n \"--street\", \"Fountain\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n stderr = result.stderr\n assert \"Ambiguous\" in stderr\n assert \"US-CA\" in stderr\n assert \"CA-SK\" in stderr\n assert \"--all\" in stderr\n", + "tests/test_cli_intents_buildings.py": "\"\"\"Tests for the `buildings` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_buildings_passes_where_through(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"nyc\", name=\"New York\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=8000000, parent_division_id=None,\n bbox=(-74.05, 40.6, -73.9, 40.9),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York, US-NY\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"where_filters\"][0].key == \"height\"\n assert captured[\"where_filters\"][0].op == \">\"\n assert captured[\"where_filters\"][0].value == 100\n\n\ndef test_buildings_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"buildings\", \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"--where\", \"height>100\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"building\"\n assert captured[\"bbox\"] == [-74.05, 40.6, -73.9, 40.9]\n\n\ndef test_buildings_in_and_bbox_mutually_exclusive(monkeypatch):\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"New York\",\n \"--bbox\", \"-74.05,40.6,-73.9,40.9\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_buildings_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"buildings\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_buildings_in_no_match_suggests_parent(monkeypatch):\n \"\"\"A failing --in resolution names the bare-name candidate that resolves.\"\"\"\n williamsburg_va = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\", admin_level=8, population=15425,\n parent_division_id=None, bbox=(-76.75, 37.25, -76.66, 37.32),\n )\n\n def fake_resolve(q):\n return [williamsburg_va] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"buildings\", \"--in\", \"Williamsburg, Brooklyn\", \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"Williamsburg\" in result.output\n assert \"--bbox\" in result.output\n", + "tests/test_cli_intents_landuse.py": "\"\"\"Tests for the `landuse` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2600000, parent_division_id=None,\n bbox=(-74.05, 40.57, -73.83, 40.74),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_landuse_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--class\", \"residential\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"residential\"\n\n\ndef test_landuse_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"landuse\", \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"land_use\"\n assert captured[\"bbox\"] == [-74.05, 40.57, -73.83, 40.74]\n\n\ndef test_landuse_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"landuse\", \"--in\", \"Brooklyn\",\n \"--bbox\", \"-74.05,40.57,-73.83,40.74\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_landuse_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"landuse\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_places.py": "\"\"\"Tests for the `places` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\nclass _FakeReaderWithCategories:\n \"\"\"Stub reader that surfaces a fixed list of categories.primary values.\"\"\"\n schema = object()\n\n def __init__(self, categories):\n import pyarrow as pa\n struct_arr = pa.array(\n [{\"primary\": c} for c in categories],\n type=pa.struct([pa.field(\"primary\", pa.string())]),\n )\n self._batch = pa.record_batch([struct_arr], names=[\"categories\"])\n self._yielded = False\n\n def read_next_batch(self):\n if self._yielded:\n raise StopIteration\n self._yielded = True\n return self._batch\n\n\ndef _setup(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\",\n lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n monkeypatch.setattr(\"botmap.cli.save_state\", lambda *a, **k: None)\n\n\ndef test_places_with_category(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--category\", \"restaurant\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert len(cats) == 1\n assert cats[0].value == \"restaurant\"\n\n\ndef test_places_with_bbox(monkeypatch):\n _setup(monkeypatch)\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.295,37.778,-122.265,37.800\",\n \"--category\", \"coffee_shop\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"place\"\n assert captured[\"bbox\"] == [-122.295, 37.778, -122.265, 37.800]\n cats = [f for f in captured[\"where_filters\"]\n if f.key == \"categories.primary\"]\n assert cats and cats[0].value == \"coffee_shop\"\n\n\ndef test_places_in_and_bbox_mutually_exclusive(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"places\", \"--in\", \"Boston, MA\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_places_requires_in_or_bbox(monkeypatch):\n _setup(monkeypatch)\n runner = CliRunner()\n result = runner.invoke(cli, [\"places\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n\n\ndef test_places_zero_results_emits_category_suggestion(monkeypatch):\n \"\"\"When categories.primary=X returns 0 rows, the CLI suggests near matches.\"\"\"\n _setup(monkeypatch)\n\n # First reader (the filtered query) returns 0 rows.\n # Second reader (the suggestion enumeration) returns a known category list.\n readers = [\n _DummyReader(), # filtered query \u2014 copy() will see 0 rows\n _FakeReaderWithCategories([\n \"ferry_terminal\", \"ferry_service\", \"ferry_boat_company\",\n \"coffee_shop\", \"restaurant\", \"hospital\",\n ]),\n ]\n\n def fake_reader(*a, **k):\n return readers.pop(0)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n # copy() returns rows_written; force 0 to trigger the hint.\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--category\", \"ferry\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0, (result.output, result.stderr)\n # Hint goes to stderr; difflib should rank the three ferry_* values first.\n assert \"0 rows\" in result.stderr\n assert \"ferry\" in result.stderr\n assert \"ferry_terminal\" in result.stderr or \"ferry_service\" in result.stderr\n\n\ndef test_places_zero_results_no_category_filter_no_hint(monkeypatch):\n \"\"\"Without a categories.primary filter, no suggestion scan runs.\"\"\"\n _setup(monkeypatch)\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _DummyReader())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda r, w: 0)\n # If the suggester runs, it'd call record_batch_reader a second time.\n # We didn't queue a second reader, so a second call would return the\n # same _DummyReader, but we'll assert no suggestion text either way.\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-122.32,37.77,-122.28,37.80\",\n \"--where\", \"confidence>0.99\",\n \"-f\", \"geojson\", \"-o\", \"out.geojson\",\n ])\n assert result.exit_code == 0\n assert \"Did you mean\" not in result.stderr\n", + "tests/test_cli_intents_roads.py": "\"\"\"Tests for the `roads` intent verb.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef test_roads_class_shortcut(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"tx\", name=\"Texas\", subtype=\"region\",\n country=\"US\", region=\"US-TX\",\n admin_level=4, population=30000000, parent_division_id=None,\n bbox=(-106.6, 25.8, -93.5, 36.5),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas, US\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_with_bbox(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n captured = {}\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"roads\", \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"--class\", \"motorway\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"segment\"\n assert captured[\"bbox\"] == [-106.6, 25.8, -93.5, 36.5]\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"motorway\"\n\n\ndef test_roads_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"roads\", \"--in\", \"Texas\",\n \"--bbox\", \"-106.6,25.8,-93.5,36.5\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_roads_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"roads\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_intents_water.py": "\"\"\"Tests for the `water` intent verb.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\nclass _DummyWriter:\n def __enter__(self): return self\n def __exit__(self, *a): return False\n\n\nclass _DummyReader:\n schema = object()\n\n\ndef _patch_common(monkeypatch, captured):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [Division(\n id=\"boston\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=None,\n bbox=(-71.19, 42.23, -70.99, 42.40),\n )],\n )\n monkeypatch.setattr(\"botmap.cli.get_writer\", lambda *a, **k: _DummyWriter())\n monkeypatch.setattr(\"botmap.cli.copy\", lambda *a, **k: None)\n\n def fake_reader(type_, bbox, *a, where_filters=None, **k):\n captured[\"type\"] = type_\n captured[\"bbox\"] = bbox\n captured[\"where_filters\"] = where_filters\n return _DummyReader()\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n\ndef test_water_class_shortcut(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston, MA\",\n \"--class\", \"river\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n klass = [f for f in captured[\"where_filters\"] if f.key == \"class\"]\n assert klass and klass[0].value == \"river\"\n\n\ndef test_water_with_bbox(monkeypatch):\n captured = {}\n _patch_common(monkeypatch, captured)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"water\", \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n assert captured[\"type\"] == \"water\"\n assert captured[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n\n\ndef test_water_in_and_bbox_mutually_exclusive():\n runner = CliRunner()\n result = runner.invoke(cli, [\n \"water\", \"--in\", \"Boston\",\n \"--bbox\", \"-71.19,42.23,-70.99,42.40\",\n \"-f\", \"geojsonseq\",\n ])\n assert result.exit_code != 0\n assert \"mutually exclusive\" in result.output\n\n\ndef test_water_requires_in_or_bbox():\n runner = CliRunner()\n result = runner.invoke(cli, [\"water\", \"-f\", \"geojsonseq\"])\n assert result.exit_code != 0\n assert \"Provide --in or --bbox\" in result.output\n", + "tests/test_cli_introspection.py": "\"\"\"Tests for the introspection CLI commands.\"\"\"\n\nimport json\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_themes_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"themes\"])\n assert result.exit_code == 0\n assert \"buildings\" in result.output\n assert \"transportation\" in result.output\n\n\ndef test_themes_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"themes\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert isinstance(data, list)\n assert len(data) == 6\n assert all(\"name\" in t and \"description\" in t and \"types\" in t for t in data)\n\n\ndef test_types_all_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"segment\" in result.output\n\n\ndef test_types_filtered_human():\n runner = CliRunner()\n result = runner.invoke(cli, [\"types\", \"--theme\", \"buildings\"])\n assert result.exit_code == 0\n assert \"building\" in result.output\n assert \"building_part\" in result.output\n assert \"segment\" not in result.output\n\n\ndef test_types_json():\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"types\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert len(data) == 15\n", + "tests/test_cli_json.py": "\"\"\"Tests for the global --json flag.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_json_flag_sets_context_object():\n \"\"\"--json sets ctx.obj['json'] = True for child commands.\"\"\"\n runner = CliRunner()\n # Invoke a command that doesn't actually exist yet but parses the flag.\n # We'll just check that --help still works with --json present.\n result = runner.invoke(cli, [\"--json\", \"--help\"])\n assert result.exit_code == 0\n", + "tests/test_cli_releases.py": "\"\"\"Tests for releases CLI commands.\"\"\"\n\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.models import Backend, PipelineState\n\n\ndef test_releases_list(monkeypatch):\n \"\"\"`releases list` prints all releases.\"\"\"\n monkeypatch.setattr(\n \"botmap.cli.list_releases\",\n lambda: [\"2025-01-01.0\", \"2024-12-01.0\", \"2024-11-01.0\"],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n assert \"2024-12-01.0\" in result.output\n assert \"2024-11-01.0\" in result.output\n\n\ndef test_releases_list_empty(monkeypatch):\n \"\"\"`releases list` handles empty list without crashing.\"\"\"\n monkeypatch.setattr(\"botmap.cli.list_releases\", lambda: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"list\"])\n assert result.exit_code == 0\n\n\ndef test_releases_latest(monkeypatch):\n \"\"\"`releases latest` prints the latest release.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"latest\"])\n assert result.exit_code == 0\n assert \"2025-01-01.0\" in result.output\n\n\ndef test_releases_check_up_to_date(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 0 when file matches latest release.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2025-01-01.0\",\n last_run=\"2025-01-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 0\n assert \"Up to date\" in result.output\n\n\ndef test_releases_check_update_available(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when a newer release exists.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n mock_state = PipelineState(\n last_release=\"2024-11-01.0\",\n last_run=\"2024-11-01T00:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=str(output_file),\n )\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: mock_state)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-01-01.0\")\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n assert \"Update available\" in result.output\n\n\ndef test_releases_check_no_state_file(monkeypatch, tmp_path):\n \"\"\"`releases check` exits 1 when no state file found.\"\"\"\n output_file = tmp_path / \"out.geojson\"\n output_file.touch()\n monkeypatch.setattr(\"botmap.cli.load_state\", lambda path: None)\n runner = CliRunner()\n result = runner.invoke(cli, [\"releases\", \"check\", \"-o\", str(output_file)])\n assert result.exit_code == 1\n\n\ndef test_releases_exists_true(monkeypatch):\n \"\"\"`releases exists` prints true when release exists.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: True)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"2025-12-17.0\"])\n\n assert result.exit_code == 0\n assert result.output.strip() == \"true\"\n\n\ndef test_releases_exists_false(monkeypatch):\n \"\"\"`releases exists` fails when release does not exist.\"\"\"\n\n monkeypatch.setattr(\"botmap.cli.release_exists\", lambda release: False)\n runner = CliRunner()\n\n result = runner.invoke(cli, [\"releases\", \"exists\", \"1900-01-01.0\"])\n\n assert result.exit_code == 1\n assert \"Release '1900-01-01.0' not found\" in result.output\n", + "tests/test_cli_sample.py": "\"\"\"Tests for the `sample` command.\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n import pyarrow as pa\n self.n = n\n self.schema = pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n self._done = False\n\n def read_next_batch(self):\n import pyarrow as pa\n if self._done:\n raise StopIteration\n self._done = True\n # WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n wkb_point_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n )\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": wkb_point_00}\n for i in range(self.n)],\n schema=self.schema,\n )\n\n\ndef test_sample_respects_n_limit(monkeypatch, tmp_path):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_reader(type_, *a, **k):\n return _NRowReader(50)\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\", fake_reader)\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"sample\", \"-t\", \"place\",\n \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\",\n \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, result.output\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n", + "tests/test_cli_schema.py": "\"\"\"Tests for the `schema` command.\"\"\"\n\nimport json\n\nimport pyarrow as pa\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\ndef test_schema_command_json(monkeypatch):\n \"\"\"`schema` returns flattened schema + sample feature.\"\"\"\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"height\": 50.0, \"categories\": {\"primary\": \"hotel\"}}],\n schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n assert payload[\"type\"] == \"place\"\n field_names = {f[\"name\"] for f in payload[\"fields\"]}\n assert \"id\" in field_names\n assert \"categories.primary\" in field_names\n assert \"example\" in payload\n\n\ndef test_schema_command_serializes_wkb_geometry(monkeypatch):\n \"\"\"A sample feature with WKB-bytes geometry must serialize as GeoJSON.\"\"\"\n import shapely.wkb\n from shapely.geometry import Point\n\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n wkb = shapely.wkb.dumps(Point(-73.985, 40.748))\n\n class _Reader:\n def __init__(self):\n self.schema = schema\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return pa.RecordBatch.from_pylist(\n [{\"id\": \"abc\", \"geometry\": wkb}], schema=schema,\n )\n\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _Reader())\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"schema\", \"-t\", \"place\"])\n assert result.exit_code == 0, result.output\n payload = json.loads(result.output)\n geom = payload[\"example\"][\"geometry\"]\n assert geom[\"type\"] == \"Point\"\n assert geom[\"coordinates\"] == [-73.985, 40.748]\n", + "tests/test_cli_verb_limit.py": "\"\"\"The convenience verbs (places, buildings, roads, ...) honor -n/--limit.\n\nMirrors the `sample` limit test: a fake reader yields more rows than the\nlimit, and we assert the geojsonseq output is truncated to N. Using --bbox\navoids the divisions-index/network path; monkeypatching get_latest_release\nkeeps the release-validation callback offline.\n\"\"\"\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\n\n\n# WKB POINT(0 0) \u2014 minimal valid little-endian POINT geometry\n_WKB_POINT_00 = (\n b\"\\x01\\x01\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n)\n\n_SCHEMA_NAMES = (\"id\", \"name\", \"geometry\")\n\n\ndef _schema():\n import pyarrow as pa\n return pa.schema([\n (\"id\", pa.string()),\n (\"name\", pa.string()),\n (\"geometry\", pa.binary()),\n ])\n\n\ndef _row_batch(start, count, schema):\n import pyarrow as pa\n return pa.RecordBatch.from_pylist(\n [{\"id\": f\"i{i}\", \"name\": f\"r{i}\", \"geometry\": _WKB_POINT_00}\n for i in range(start, start + count)],\n schema=schema,\n )\n\n\nclass _NRowReader:\n \"\"\"A reader that yields one batch of N synthetic rows then stops.\"\"\"\n\n def __init__(self, n):\n self.n = n\n self.schema = _schema()\n self._done = False\n\n def read_next_batch(self):\n if self._done:\n raise StopIteration\n self._done = True\n return _row_batch(0, self.n, self.schema)\n\n\nclass _MultiBatchReader:\n \"\"\"Yields `nbatches` batches of `per_batch` rows \u2014 exercises the\n cross-batch slicing path in _limit_reader (single-batch readers never\n hit the `batch.num_rows > remaining` slice).\"\"\"\n\n def __init__(self, nbatches, per_batch):\n self.schema = _schema()\n self._remaining = nbatches\n self._per_batch = per_batch\n self._emitted = 0\n\n def read_next_batch(self):\n if self._remaining <= 0:\n raise StopIteration\n self._remaining -= 1\n batch = _row_batch(self._emitted, self._per_batch, self.schema)\n self._emitted += self._per_batch\n return batch\n\n\n# (verb, extra args) \u2014 one representative invocation per convenience verb.\nVERB_CASES = [\n (\"places\", []),\n (\"buildings\", []),\n (\"roads\", []),\n (\"water\", []),\n (\"landuse\", []),\n (\"addresses\", []),\n]\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_respects_limit(monkeypatch, verb, extra):\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", \"5\", \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 5 # truncated to N\n\n\n@pytest.mark.parametrize(\"verb,extra\", VERB_CASES)\ndef test_verb_unlimited_by_default(monkeypatch, verb, extra):\n \"\"\"Without -n the verb streams every matching feature (no truncation).\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: _NRowReader(50))\n\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n verb, \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n *extra,\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n lines = open(\"out.jsonl\").read().strip().split(\"\\n\")\n assert len(lines) == 50 # all rows\n\n\ndef _run_places(monkeypatch, reader, n):\n \"\"\"Invoke `places` with a fake reader and a limit; return output lines.\"\"\"\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.record_batch_reader\",\n lambda *a, **k: reader)\n runner = CliRunner()\n with runner.isolated_filesystem():\n result = runner.invoke(cli, [\n \"places\", \"--bbox\", \"-71.1,42.3,-71.0,42.4\",\n \"-n\", str(n), \"-f\", \"geojsonseq\", \"-o\", \"out.jsonl\",\n ])\n assert result.exit_code == 0, (result.output, getattr(result, \"stderr\", \"\"))\n content = open(\"out.jsonl\").read().strip()\n return content.split(\"\\n\") if content else []\n\n\ndef test_limit_slices_across_batches(monkeypatch):\n \"\"\"A limit that lands mid-stream truncates across batch boundaries:\n 3 batches of 20, limit 25 -> 20 from the first batch + 5 from the second.\"\"\"\n lines = _run_places(monkeypatch, _MultiBatchReader(nbatches=3, per_batch=20), 25)\n assert len(lines) == 25\n\n\ndef test_limit_zero_emits_nothing(monkeypatch):\n \"\"\"-n 0 is honored (limit is not None) and produces an empty result.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), 0)\n assert lines == []\n\n\ndef test_negative_limit_emits_nothing(monkeypatch):\n \"\"\"A negative limit degrades gracefully to 0 rows rather than erroring.\"\"\"\n lines = _run_places(monkeypatch, _NRowReader(50), -1)\n assert lines == []\n", + "tests/test_cli_where.py": "\"\"\"Tests for the `where` command.\"\"\"\n\nimport json\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom botmap.cli import cli\nfrom botmap.geocoding import Division\n\n\n_BOSTON = Division(\n id=\"boston-ma\", name=\"Boston\", subtype=\"locality\",\n country=\"US\", region=\"US-MA\",\n admin_level=8, population=654776, parent_division_id=\"ma\",\n bbox=(-71.19, 42.23, -70.99, 42.40),\n)\n\n\n@pytest.fixture\ndef fake_match(monkeypatch):\n captured = {}\n\n def fake_resolve(query):\n captured[\"query\"] = query\n return [_BOSTON]\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n return captured\n\n\ndef test_where_human_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n assert \"Boston\" in result.output\n assert \"US-MA\" in result.output\n assert \"654776\" in result.output or \"654,776\" in result.output\n\n\ndef test_where_json_output(fake_match):\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Boston, MA\"])\n assert result.exit_code == 0\n data = json.loads(result.output)\n assert data[\"name\"] == \"Boston\"\n assert data[\"region\"] == \"US-MA\"\n assert data[\"bbox\"] == [-71.19, 42.23, -70.99, 42.40]\n assert \"candidates\" in data\n\n\ndef test_where_no_match(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n\n\ndef test_where_no_match_json(monkeypatch):\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [])\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Nonexistentville\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined or \"No match\" in combined\n\n\n_WILLIAMSBURG_VA = Division(\n id=\"williamsburg-va\", name=\"Williamsburg\", subtype=\"locality\",\n country=\"US\", region=\"US-VA\",\n admin_level=8, population=15425, parent_division_id=None,\n bbox=(-76.75, 37.25, -76.66, 37.32),\n)\n\n_WILLIAMSBURG_NY = Division(\n id=\"williamsburg-ny\", name=\"Williamsburg\", subtype=\"microhood\",\n country=\"US\", region=\"US-NY\",\n admin_level=None, population=None, parent_division_id=\"brooklyn\",\n bbox=(-73.963, 40.706, -73.944, 40.724),\n)\n\n_BROOKLYN = Division(\n id=\"brooklyn\", name=\"Brooklyn\", subtype=\"locality\",\n country=\"US\", region=\"US-NY\",\n admin_level=8, population=2736074, parent_division_id=\"nyc\",\n bbox=(-74.04, 40.57, -73.83, 40.74),\n)\n\n\ndef test_where_no_match_suggests_bare_name(monkeypatch):\n \"\"\"A neighborhood-qualified query that fails should name the bare-name\n candidate that does resolve, so the agent has a recovery path.\"\"\"\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n # Names the resolvable parent candidate and offers recovery paths.\n assert \"Williamsburg\" in result.output\n assert \"US-VA\" in result.output\n assert \"--bbox\" in result.output\n\n\ndef test_where_no_match_json_includes_suggestion(monkeypatch):\n def fake_resolve(q):\n return [_WILLIAMSBURG_VA] if q == \"Williamsburg\" else []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n runner = CliRunner()\n result = runner.invoke(cli, [\"--json\", \"where\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code != 0\n combined = result.output + (result.stderr if hasattr(result, \"stderr\") else \"\")\n assert \"no_match\" in combined\n assert \"Williamsburg\" in combined\n\n\ndef test_where_geometry_emits_geojson_feature(monkeypatch):\n \"\"\"`where --geometry` emits the division_area polygon as a GeoJSON Feature.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n assert data[\"geometry\"][\"type\"] == \"Polygon\"\n assert data[\"properties\"][\"name\"] == \"Boston\"\n assert data[\"properties\"][\"subtype\"] == \"locality\"\n\n\ndef test_where_geojson_alias_flag(monkeypatch):\n \"\"\"`--geojson` is an accepted alias for `--geometry`.\"\"\"\n from shapely.geometry import box\n\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = box(-71.19, 42.23, -70.99, 42.40)\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geojson\"])\n assert result.exit_code == 0, result.output\n data = json.loads(result.output)\n assert data[\"type\"] == \"Feature\"\n\n\ndef test_resolve_in_place_falls_back_via_parent_region(monkeypatch):\n \"\"\"'Williamsburg, Brooklyn': qualifier resolves as locality \u2192 retry with its region.\"\"\"\n def fake_resolve(q):\n if q == \"Williamsburg, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"Williamsburg, US-NY\":\n return [_WILLIAMSBURG_NY]\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 7)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"Williamsburg, Brooklyn\"])\n assert result.exit_code == 0, result.output\n # Warning names the parent that was used for resolution.\n assert \"Brooklyn\" in result.output\n\n\ndef test_resolve_in_place_falls_back_to_parent_bbox(monkeypatch):\n \"\"\"When the name isn't found in the parent's region, use the parent's bbox.\"\"\"\n def fake_resolve(q):\n if q == \"SoHo, Brooklyn\":\n return []\n if q == \"Brooklyn\":\n return [_BROOKLYN]\n if q == \"SoHo, US-NY\":\n return [] # Not in the index at all\n return []\n\n monkeypatch.setattr(\"botmap.cli.resolve\", fake_resolve)\n monkeypatch.setattr(\"botmap.cli.get_latest_release\", lambda: \"2025-12-17.0\")\n monkeypatch.setattr(\"botmap.cli.count_rows\", lambda *a, **k: 42)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"count\", \"-t\", \"place\", \"--in\", \"SoHo, Brooklyn\"])\n # Falls back to Brooklyn's bbox rather than failing outright.\n assert result.exit_code == 0, result.output\n assert \"Brooklyn\" in result.output\n\n\ndef test_where_geometry_no_polygon_errors(monkeypatch):\n \"\"\"When no division_area polygon exists, --geometry errors cleanly.\"\"\"\n monkeypatch.setattr(\"botmap.cli.resolve\", lambda q: [_BOSTON])\n monkeypatch.setattr(\"botmap.cli.get_latest_release\",\n lambda: \"2025-12-17.0\")\n\n def fake_prefetch(ids, lon, lat, release):\n import botmap.cli as c\n c._polygon_cache[ids[0]] = None\n\n monkeypatch.setattr(\"botmap.cli._prefetch_polygons\", fake_prefetch)\n\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Boston, MA\", \"--geometry\"])\n assert result.exit_code != 0\n\n\ndef test_where_ambiguous_shows_hint(monkeypatch):\n \"\"\"When multiple matches exist, the human view hints at --all.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\"])\n assert result.exit_code == 0\n assert \"Alameda\" in result.output\n assert \"US-CA\" in result.output\n assert \"--all\" in result.output # hint to disambiguate\n # By default only the first match is shown in detail\n assert \"CA-SK\" not in result.output\n\n\ndef test_where_all_lists_every_match(monkeypatch):\n \"\"\"`where --all` shows every candidate.\"\"\"\n alameda_ca = Division(\n id=\"alameda-ca\", name=\"Alameda\", subtype=\"locality\",\n country=\"US\", region=\"US-CA\",\n admin_level=8, population=78280, parent_division_id=None,\n bbox=(-122.34, 37.71, -122.21, 37.79),\n )\n alameda_sk = Division(\n id=\"alameda-sk\", name=\"Alameda\", subtype=\"region\",\n country=\"CA\", region=\"CA-SK\",\n admin_level=4, population=None, parent_division_id=None,\n bbox=(-102.3, 49.2, -102.2, 49.3),\n )\n monkeypatch.setattr(\n \"botmap.cli.resolve\",\n lambda q: [alameda_ca, alameda_sk],\n )\n runner = CliRunner()\n result = runner.invoke(cli, [\"where\", \"Alameda, CA\", \"--all\"])\n assert result.exit_code == 0\n assert \"[1]\" in result.output\n assert \"[2]\" in result.output\n assert \"US-CA\" in result.output\n assert \"CA-SK\" in result.output\n", + "tests/test_copy.py": "\"\"\"Tests for the copy() function.\"\"\"\n\nfrom botmap.writers import copy\n\n\nclass _FakeBatch:\n def __init__(self, num_rows):\n self.num_rows = num_rows\n\n\nclass _FakeReader:\n def __init__(self, batches):\n self._batches = iter(batches)\n\n def read_next_batch(self):\n try:\n return next(self._batches)\n except StopIteration:\n raise StopIteration\n\n\nclass _FakeWriter:\n def __init__(self):\n self.batches = []\n\n def write_batch(self, batch):\n self.batches.append(batch)\n\n\ndef test_copy_writes_all_batches():\n reader = _FakeReader([_FakeBatch(10), _FakeBatch(20), _FakeBatch(5)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 3\n\n\ndef test_copy_skips_empty_batches():\n reader = _FakeReader([_FakeBatch(0), _FakeBatch(10), _FakeBatch(0)])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 1\n\n\ndef test_copy_empty_reader():\n reader = _FakeReader([])\n writer = _FakeWriter()\n\n copy(reader, writer)\n\n assert len(writer.batches) == 0\n", + "tests/test_core.py": "\"\"\"Tests for pure (no-network) functions in core.py.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.core import (\n _binary_search_manifest,\n _coerce_bbox,\n _dataset_path,\n geoarrow_schema_adapter,\n get_all_overture_types,\n type_theme_map,\n)\nfrom botmap.models import BBox\n\n\nclass TestCoerceBbox:\n def test_none_returns_none(self):\n assert _coerce_bbox(None) is None\n\n def test_bbox_instance_passthrough(self):\n bbox = BBox(xmin=1.0, ymin=2.0, xmax=3.0, ymax=4.0)\n assert _coerce_bbox(bbox) is bbox\n\n def test_from_tuple(self):\n result = _coerce_bbox((-71.1, 42.3, -71.0, 42.4))\n assert isinstance(result, BBox)\n assert result.xmin == -71.1\n assert result.ymin == 42.3\n assert result.xmax == -71.0\n assert result.ymax == 42.4\n\n def test_from_list(self):\n result = _coerce_bbox([-71.1, 42.3, -71.0, 42.4])\n assert isinstance(result, BBox)\n assert result.ymin == 42.3\n\n def test_wrong_length_raises(self):\n with pytest.raises(ValueError):\n _coerce_bbox((1.0, 2.0, 3.0))\n\n\nclass TestDatasetPath:\n def test_building_contains_theme_and_type(self):\n path = _dataset_path(\"building\", \"2025-01-22.0\")\n assert \"buildings\" in path\n assert \"building\" in path\n assert \"2025-01-22.0\" in path\n\n def test_path_starts_with_s3_bucket(self):\n path = _dataset_path(\"place\", \"2025-01-22.0\")\n assert path.startswith(\"overturemaps-us-west-2/release/\")\n assert \"places\" in path\n assert \"place\" in path\n\n\nclass TestBinarySearchManifest:\n def test_first_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"aaa\") == \"file1.parquet\"\n\n def test_middle_file(self):\n manifest = [\n (\"file1.parquet\", \"bbb\"),\n (\"file2.parquet\", \"ddd\"),\n (\"file3.parquet\", \"fff\"),\n ]\n assert _binary_search_manifest(manifest, \"ccc\") == \"file2.parquet\"\n\n def test_exact_max_id_matches_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"bbb\") == \"file1.parquet\"\n\n def test_last_file(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"ddd\") == \"file2.parquet\"\n\n def test_not_found_returns_none(self):\n manifest = [(\"file1.parquet\", \"bbb\"), (\"file2.parquet\", \"ddd\")]\n assert _binary_search_manifest(manifest, \"zzz\") is None\n\n def test_empty_manifest_returns_none(self):\n assert _binary_search_manifest([], \"aaa\") is None\n\n\nclass TestGetAllOvertureTypes:\n def test_returns_nonempty_list(self):\n result = get_all_overture_types()\n assert isinstance(result, list)\n assert len(result) > 0\n\n def test_includes_core_types(self):\n types = get_all_overture_types()\n for t in (\"building\", \"place\", \"segment\", \"water\", \"land\"):\n assert t in types\n\n def test_matches_type_theme_map_keys(self):\n assert set(get_all_overture_types()) == set(type_theme_map.keys())\n\n\nclass TestGeoarrowSchemaAdapter:\n def test_adds_extension_metadata_to_geometry(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n geom_field = result.field(\"geometry\")\n assert geom_field.metadata[b\"ARROW:extension:name\"] == b\"geoarrow.wkb\"\n\n def test_non_geometry_fields_unchanged(self):\n schema = pa.schema(\n [pa.field(\"id\", pa.string()), pa.field(\"geometry\", pa.large_binary())]\n )\n result = geoarrow_schema_adapter(schema)\n assert result.field(\"id\").type == pa.string()\n assert result.field(\"id\").metadata is None\n", + "tests/test_filters.py": "\"\"\"Tests for the --where filter parser.\"\"\"\n\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport pytest\n\nfrom botmap.filters import parse_where_expr, ParsedFilter\n\n\nclass TestParseWhereExpr:\n def test_equality_string(self):\n f = parse_where_expr(\"categories.primary=restaurant\")\n assert f == ParsedFilter(key=\"categories.primary\", op=\"=\", value=\"restaurant\")\n\n def test_equality_int(self):\n f = parse_where_expr(\"num_floors=10\")\n assert f.value == 10\n\n def test_equality_float(self):\n f = parse_where_expr(\"confidence=0.85\")\n assert f.value == 0.85\n\n def test_equality_bool_true(self):\n f = parse_where_expr(\"has_parts=true\")\n assert f.value is True\n\n def test_equality_bool_false(self):\n f = parse_where_expr(\"has_parts=false\")\n assert f.value is False\n\n def test_not_equal(self):\n f = parse_where_expr(\"class!=footway\")\n assert f.op == \"!=\"\n assert f.value == \"footway\"\n\n def test_gt(self):\n f = parse_where_expr(\"height>100\")\n assert f.op == \">\"\n assert f.value == 100\n\n def test_gte(self):\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n\n def test_lt(self):\n f = parse_where_expr(\"height<50\")\n assert f.op == \"<\"\n\n def test_lte(self):\n f = parse_where_expr(\"height<=50\")\n assert f.op == \"<=\"\n\n def test_in_list(self):\n f = parse_where_expr(\"class in [motorway,primary,trunk]\")\n assert f.op == \"in\"\n assert f.value == [\"motorway\", \"primary\", \"trunk\"]\n\n def test_in_list_with_spaces(self):\n f = parse_where_expr(\"class in [ motorway , primary ]\")\n assert f.value == [\"motorway\", \"primary\"]\n\n def test_in_list_typed(self):\n f = parse_where_expr(\"num_floors in [1,2,3]\")\n assert f.value == [1, 2, 3]\n\n def test_longest_operator_wins(self):\n # ensure `>=` isn't misread as `>` followed by `=...`\n f = parse_where_expr(\"height>=100\")\n assert f.op == \">=\"\n assert f.value == 100\n\n def test_dotted_key(self):\n f = parse_where_expr(\"bbox.xmin<-70\")\n assert f.key == \"bbox.xmin\"\n assert f.value == -70\n\n def test_missing_operator_raises(self):\n with pytest.raises(ValueError, match=\"no operator\"):\n parse_where_expr(\"just_a_key\")\n\n def test_missing_operator_explains_shell_redirection(self):\n # A bare key like \"height\" reaches the parser when the shell ate an\n # unquoted `>150` as a redirection. The error must name the key,\n # show the K OP V form, and explain the single-quote fix.\n with pytest.raises(ValueError) as exc:\n parse_where_expr(\"height\")\n msg = str(exc.value)\n assert \"height\" in msg\n assert \"height>150\" in msg or \"K OP V\" in msg\n assert \"single-quote\" in msg or \"single quote\" in msg\n assert \"redirect\" in msg.lower()\n\n def test_empty_value_raises(self):\n with pytest.raises(ValueError, match=\"empty value\"):\n parse_where_expr(\"key=\")\n\n\nclass TestToPyarrowExpression:\n def test_simple_equality(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"=\", \"motorway\")\n expr = f.to_pyarrow_expression(schema)\n # Just verify it's an Expression; equality semantics are tested at\n # integration time against a real dataset.\n assert isinstance(expr, pc.Expression)\n\n def test_nested_field(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_in_operator(self):\n schema = pa.schema([(\"class\", pa.string())])\n f = ParsedFilter(\"class\", \"in\", [\"motorway\", \"primary\"])\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n def test_numeric_comparison(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 100)\n expr = f.to_pyarrow_expression(schema)\n assert isinstance(expr, pc.Expression)\n\n\nclass TestValidateAgainstSchema:\n def test_top_level_field_ok(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height\", \">\", 50)\n # Should not raise\n f.validate_against_schema(schema)\n\n def test_nested_field_ok(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.primary\", \"=\", \"restaurant\")\n f.validate_against_schema(schema)\n\n def test_unknown_top_level_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"widht\", \">\", 50) # typo\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"widht\" in str(exc.value)\n assert \"available fields\" in str(exc.value).lower()\n assert \"height\" in str(exc.value)\n\n def test_unknown_nested_raises(self):\n schema = pa.schema([\n (\"categories\", pa.struct([(\"primary\", pa.string())])),\n ])\n f = ParsedFilter(\"categories.banana\", \"=\", \"x\")\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"categories.banana\" in str(exc.value)\n assert \"primary\" in str(exc.value)\n\n def test_dotted_into_non_struct_raises(self):\n schema = pa.schema([(\"height\", pa.float64())])\n f = ParsedFilter(\"height.foo\", \"=\", 1)\n with pytest.raises(ValueError):\n f.validate_against_schema(schema)\n\n def test_duplicate_segment_error_message(self):\n \"\"\"Path with duplicate segments still produces the correct error position.\"\"\"\n schema = pa.schema([\n (\"a\", pa.struct([(\"b\", pa.int64())])), # a.b is an int (not struct)\n ])\n f = ParsedFilter(\"a.b.c\", \"=\", 1) # trying to dot into the int\n with pytest.raises(ValueError) as exc:\n f.validate_against_schema(schema)\n assert \"a.b is not a struct\" in str(exc.value)\n", + "tests/test_geocoding.py": "\"\"\"Tests for the geocoding lookup.\"\"\"\n\nfrom pathlib import Path\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nfrom botmap.geocoding import resolve, best_match, Division\n\n\ndef _build_index_file(tmp_path: Path) -> Path:\n \"\"\"Write a tiny fake divisions index parquet at the expected location.\"\"\"\n table = pa.table({\n \"id\": [\n \"us\", \"ma\", \"boston-ma\", \"boston-uk\", \"cambridge-ma\", \"cambridge-uk\",\n \"walnut-creek-ca\",\n # Alameda ambiguity: only the CA-SK county has admin_level set;\n # only the US-CA locality has population. Tests the has_pop bias.\n \"alameda-ca\", \"alameda-sk\",\n ],\n \"name_primary\": [\n \"United States\", \"Massachusetts\", \"Boston\", \"Boston\",\n \"Cambridge\", \"Cambridge\",\n \"Walnut Creek\",\n \"Alameda\", \"Alameda\",\n ],\n \"subtype\": [\n \"country\", \"region\", \"locality\", \"locality\", \"locality\", \"locality\",\n \"locality\",\n \"locality\", \"county\",\n ],\n \"class\": [None] * 9,\n \"country\": [\"US\", \"US\", \"US\", \"GB\", \"US\", \"GB\", \"US\", \"US\", \"CA\"],\n \"region\": [\n None, \"US-MA\", \"US-MA\", \"GB-LIN\", \"US-MA\", \"GB-CAM\", \"US-CA\",\n \"US-CA\", \"CA-SK\",\n ],\n \"admin_level\": [2, 4, 8, 8, 8, 8, 8, None, 2],\n \"population\": [\n 330000000, 7000000, 654776, 41000, 118000, 145000, 70000,\n 77624, None,\n ],\n \"parent_division_id\": [\n None, \"us\", \"ma\", \"lincolnshire\", \"ma\", \"cambridgeshire\", \"ca\",\n \"ca\", \"sk\",\n ],\n \"bbox_xmin\": [-180.0, -73.5, -71.19, 0.00, -71.16, 0.10, -122.10, -122.34, -102.30],\n \"bbox_ymin\": [18.0, 41.2, 42.23, 53.00, 42.36, 52.18, 37.86, 37.71, 49.20],\n \"bbox_xmax\": [-66.0, -69.9, -70.99, 0.20, -71.07, 0.20, -121.97, -122.21, -102.20],\n \"bbox_ymax\": [71.0, 42.9, 42.40, 53.10, 42.42, 52.22, 37.94, 37.79, 49.30],\n })\n out = tmp_path / \"botmap\" / \"divisions-index-2025-12-17.0.parquet\"\n out.parent.mkdir(parents=True, exist_ok=True)\n pq.write_table(table, out)\n return out\n\n\n@pytest.fixture\ndef fake_index(monkeypatch, tmp_path):\n monkeypatch.setenv(\"XDG_CACHE_HOME\", str(tmp_path))\n _build_index_file(tmp_path)\n # Skip the network lookup that ensure_index would do\n monkeypatch.setattr(\n \"botmap.geocoding._latest_release\", lambda: \"2025-12-17.0\",\n )\n return tmp_path\n\n\ndef test_resolve_exact_match(fake_index):\n results = resolve(\"Massachusetts\")\n assert len(results) == 1\n assert results[0].name == \"Massachusetts\"\n assert results[0].subtype == \"region\"\n\n\ndef test_resolve_case_insensitive(fake_index):\n results = resolve(\"MASSACHUSETTS\")\n assert len(results) == 1\n\n\ndef test_resolve_returns_all_ambiguous_matches(fake_index):\n results = resolve(\"Boston\")\n assert len(results) == 2\n assert all(r.name == \"Boston\" for r in results)\n\n\ndef test_best_match_prefers_higher_population_on_tie(fake_index):\n # Both Bostons have admin_level=8; pick by population\n pick = best_match(\"Boston\")\n assert pick.region == \"US-MA\"\n assert pick.population == 654776\n\n\ndef test_best_match_country_disambiguator(fake_index):\n pick = best_match(\"Boston, GB\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_region_disambiguator(fake_index):\n pick = best_match(\"Boston, US-MA\")\n assert pick.region == \"US-MA\"\n\n\ndef test_best_match_admin_level_tiebreak_innermost_wins(fake_index):\n # \"United States\" has admin_level=2 (largest area). If we somehow had a\n # nested \"United States\" locality, admin_level should pick the innermost.\n # Here we just confirm a single match is returned for \"United States\".\n pick = best_match(\"United States\")\n assert pick.subtype == \"country\"\n\n\ndef test_best_match_no_match_raises(fake_index):\n with pytest.raises(LookupError):\n best_match(\"Nonexistentville\")\n\n\ndef test_division_bbox_property(fake_index):\n pick = best_match(\"Massachusetts\")\n assert pick.bbox == (-73.5, 41.2, -69.9, 42.9)\n\n\ndef test_resolve_region_suffix_qualifier(fake_index):\n \"\"\"'Boston, MA' should match the US-MA region (the primary documented form).\"\"\"\n results = resolve(\"Boston, MA\")\n assert len(results) == 1\n assert results[0].region == \"US-MA\"\n\n\ndef test_best_match_short_region_qualifier(fake_index):\n \"\"\"'Boston, MA' produces the same pick as 'Boston, US-MA'.\"\"\"\n pick_short = best_match(\"Boston, MA\")\n pick_full = best_match(\"Boston, US-MA\")\n assert pick_short.id == pick_full.id\n\n\ndef test_best_match_country_alpha3_alias(fake_index):\n \"\"\"'Walnut Creek, CA, USA' should map USA -> US.\"\"\"\n pick = best_match(\"Walnut Creek, CA, USA\")\n assert pick.region == \"US-CA\"\n assert pick.country == \"US\"\n\n\ndef test_best_match_country_full_name(fake_index):\n \"\"\"Full country names like 'United States' should normalize.\"\"\"\n pick = best_match(\"Walnut Creek, CA, United States\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_country_uk_alias(fake_index):\n \"\"\"'UK' should map to 'GB'.\"\"\"\n pick = best_match(\"Boston, UK\")\n assert pick.region == \"GB-LIN\"\n\n\ndef test_best_match_full_state_name_qualifier(fake_index):\n \"\"\"'Boston, Massachusetts' should resolve the same as 'Boston, MA'.\"\"\"\n pick_full = best_match(\"Boston, Massachusetts\")\n pick_short = best_match(\"Boston, MA\")\n assert pick_full.id == pick_short.id\n assert pick_full.region == \"US-MA\"\n\n\ndef test_best_match_full_state_name_case_insensitive(fake_index):\n \"\"\"State names are matched case-insensitively.\"\"\"\n pick = best_match(\"Alameda, california\")\n assert pick.region == \"US-CA\"\n\n\ndef test_best_match_unknown_qualifier_rejects(fake_index):\n \"\"\"An unknown qualifier should still narrow (and reject) \u2014 not be silently dropped.\"\"\"\n with pytest.raises(LookupError):\n best_match(\"Boston, ZZ\")\n\n\ndef test_resolve_prefers_known_population_over_admin_level(fake_index):\n \"\"\"The Alameda case: CA-SK county has admin_level=2 but no population;\n US-CA locality has population=77,624 but admin_level=None. The locality\n should win because population is the more reliable real-place signal.\"\"\"\n results = resolve(\"Alameda, CA\")\n # Both Alamedas should pass the 'CA' qualifier filter (CA-SK matches\n # country=CA; US-CA matches region suffix -CA).\n assert len(results) == 2\n # US-CA must rank first under the new ranking\n assert results[0].region == \"US-CA\"\n assert results[0].population == 77624\n assert results[1].region == \"CA-SK\"\n\n\ndef test_best_match_alameda_picks_us_ca(fake_index):\n pick = best_match(\"Alameda, CA\")\n assert pick.region == \"US-CA\"\n\n\ndef test_resolve_admin_level_only_tiebreak_when_no_population(fake_index):\n \"\"\"When neither candidate has population, admin_level still decides.\n Both Bostons have admin_level=8 and populations, so this is constructed\n differently: an unqualified 'Alameda' search returns just our two\n Alamedas; among them only US-CA has population so it must win.\"\"\"\n results = resolve(\"Alameda\")\n assert results[0].region == \"US-CA\"\n", + "tests/test_gers.py": "\"\"\"\nTests for GERS (Global Entity Reference System) functionality.\n\"\"\"\n\nimport pyarrow as pa\nimport pytest\nfrom botmap.core import query_gers_registry, record_batch_reader_from_gers\nfrom botmap.models import BBox\n\n\nclass TestGersIntegration:\n \"\"\"Integration tests for GERS registry functionality.\"\"\"\n\n @pytest.mark.integration\n def test_real_gers_query(self):\n \"\"\"Test actual GERS query (requires network).\"\"\"\n # Known GERS ID from the Dupont Circle Hotel\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n result = query_gers_registry(gers_id)\n\n assert result is not None\n filepath, bbox = result\n assert filepath.startswith(\"overturemaps-us-west-2/release/\")\n assert \"theme=buildings\" in filepath\n assert \"type=building\" in filepath\n assert isinstance(bbox, BBox)\n assert isinstance(bbox.xmin, float)\n assert isinstance(bbox.ymin, float)\n assert isinstance(bbox.xmax, float)\n assert isinstance(bbox.ymax, float)\n\n @pytest.mark.integration\n def test_real_record_batch_reader(self):\n \"\"\"Test actual record batch reader creation (requires network).\"\"\"\n gers_id = \"0b7fc702-49e7-4b35-81cd-a19acefe0696\"\n\n reader = record_batch_reader_from_gers(gers_id)\n\n assert reader is not None\n assert isinstance(reader, pa.RecordBatchReader)\n\n # Read first batch\n batch = reader.read_next_batch()\n assert batch.num_rows == 1\n\n # Verify expected columns exist\n schema_names = [field.name for field in batch.schema]\n assert \"id\" in schema_names\n assert \"geometry\" in schema_names\n assert \"bbox\" in schema_names\n\n @pytest.mark.integration\n def test_gers_id_not_found(self):\n \"\"\"Test handling of non-existent GERS ID.\"\"\"\n # Invalid GERS ID that shouldn't exist\n gers_id = \"00000000-0000-0000-0000-000000000001\"\n\n result = query_gers_registry(gers_id)\n\n # Should return None for non-existent ID\n assert result is None\n", + "tests/test_intents.py": "\"\"\"Tests for intent-verb helpers.\"\"\"\n\nimport math\n\nimport pytest\n\nfrom botmap.intents import bbox_around_point, haversine_meters\n\n\nclass TestBboxAroundPoint:\n def test_small_radius_at_equator(self):\n bbox = bbox_around_point(0.0, 0.0, radius_meters=111320)\n # 1 deg at the equator ~= 111.32 km. Radius of 111320 m -> bbox ~= 1 deg each side.\n assert abs((bbox[2] - bbox[0]) - 2.0) < 0.05\n assert abs((bbox[3] - bbox[1]) - 2.0) < 0.05\n\n def test_radius_shrinks_with_latitude(self):\n bbox_equator = bbox_around_point(0.0, 0.0, radius_meters=10000)\n bbox_polar = bbox_around_point(60.0, 0.0, radius_meters=10000)\n eq_width = bbox_equator[2] - bbox_equator[0]\n polar_width = bbox_polar[2] - bbox_polar[0]\n # At 60\u00b0 N, cos(60\u00b0) = 0.5, so longitude span doubles for the same radius\n assert polar_width > 1.5 * eq_width\n\n\nclass TestHaversineMeters:\n def test_zero_distance(self):\n assert haversine_meters(42.0, -71.0, 42.0, -71.0) == 0\n\n def test_known_distance_short(self):\n # Approximately 111 m for 0.001 degrees of latitude at the equator\n d = haversine_meters(0.0, 0.0, 0.001, 0.0)\n assert 100 < d < 130\n\n def test_symmetry(self):\n d1 = haversine_meters(42.0, -71.0, 42.5, -70.5)\n d2 = haversine_meters(42.5, -70.5, 42.0, -71.0)\n assert math.isclose(d1, d2)\n", + "tests/test_introspection.py": "\"\"\"Tests for the introspection module.\"\"\"\n\nimport pyarrow as pa\nimport pytest\n\nfrom botmap.introspection import (\n list_themes,\n list_types,\n flatten_schema,\n THEME_DESCRIPTIONS,\n TYPE_DESCRIPTIONS,\n)\n\n\ndef test_list_themes_returns_six():\n themes = list_themes()\n assert len(themes) == 6\n names = {t[\"name\"] for t in themes}\n assert names == {\n \"addresses\", \"base\", \"buildings\",\n \"divisions\", \"places\", \"transportation\",\n }\n\n\ndef test_list_themes_has_descriptions():\n themes = list_themes()\n for t in themes:\n assert \"description\" in t\n assert \"types\" in t\n assert isinstance(t[\"types\"], list)\n\n\ndef test_list_types_full():\n types = list_types()\n assert len(types) == 15\n names = {t[\"name\"] for t in types}\n assert names == {\n \"address\", \"bathymetry\", \"building\", \"building_part\",\n \"division\", \"division_area\", \"division_boundary\",\n \"place\", \"segment\", \"connector\",\n \"infrastructure\", \"land\", \"land_cover\", \"land_use\", \"water\",\n }\n\n\ndef test_list_types_filtered_by_theme():\n types = list_types(theme=\"buildings\")\n assert {t[\"name\"] for t in types} == {\"building\", \"building_part\"}\n\n\ndef test_list_types_unknown_theme_raises():\n with pytest.raises(ValueError):\n list_types(theme=\"not-a-theme\")\n\n\ndef test_every_type_has_a_description():\n types = list_types()\n for t in types:\n assert t[\"description\"], f\"Missing description for {t['name']}\"\n\n\ndef test_flatten_schema_top_level():\n schema = pa.schema([\n (\"id\", pa.string()),\n (\"height\", pa.float64()),\n ])\n fields = flatten_schema(schema)\n assert {\"name\": \"id\", \"type\": \"string\"} in fields\n assert {\"name\": \"height\", \"type\": \"double\"} in fields\n\n\ndef test_flatten_schema_nested():\n schema = pa.schema([\n (\"categories\", pa.struct([\n (\"primary\", pa.string()),\n (\"alternate\", pa.list_(pa.string())),\n ])),\n ])\n fields = flatten_schema(schema)\n names = {f[\"name\"] for f in fields}\n assert \"categories.primary\" in names\n assert \"categories.alternate\" in names\n", + "tests/test_main.py": "\"\"\"Tests for botmap/__main__.py (PyInstaller / python -m botmap entry point).\"\"\"\n\nimport runpy\nimport sys\nfrom unittest.mock import patch\n\nimport pytest\n\n\ndef test_main_invokes_cli():\n \"\"\"__main__.py calls cli() when executed as __main__.\"\"\"\n with patch(\"botmap.cli.cli\") as mock_cli:\n mock_cli.side_effect = SystemExit(0)\n with pytest.raises(SystemExit):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n mock_cli.assert_called_once()\n\n\ndef test_main_importable():\n \"\"\"botmap.__main__ is importable without side effects.\"\"\"\n import importlib\n\n mod = importlib.import_module(\"botmap.__main__\")\n assert hasattr(mod, \"cli\")\n\n\ndef test_python_m_botmap_help(capsys):\n \"\"\"python -m botmap --help exits 0 and prints usage.\"\"\"\n with pytest.raises(SystemExit) as exc_info:\n with patch(\"sys.argv\", [\"botmap\", \"--help\"]):\n runpy.run_module(\"botmap\", run_name=\"__main__\", alter_sys=True)\n assert exc_info.value.code == 0\n captured = capsys.readouterr()\n assert \"Usage\" in captured.out or \"Usage\" in captured.err\n", + "tests/test_models.py": "\"\"\"Tests for the models module.\"\"\"\n\nfrom botmap.models import BBox, Backend, PipelineState\n\n\ndef test_bbox_as_tuple():\n \"\"\"Test BBox.as_tuple().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n assert bbox.as_tuple() == (-97.8, 30.2, -97.6, 30.4)\n\n\ndef test_bbox_as_dict():\n \"\"\"Test BBox.as_dict().\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n result = bbox.as_dict()\n assert result == {\n \"xmin\": -97.8,\n \"ymin\": 30.2,\n \"xmax\": -97.6,\n \"ymax\": 30.4,\n }\n\n\ndef test_bbox_from_dict():\n \"\"\"Test BBox.from_dict().\"\"\"\n data = {\"xmin\": -97.8, \"ymin\": 30.2, \"xmax\": -97.6, \"ymax\": 30.4}\n bbox = BBox.from_dict(data)\n assert bbox.xmin == -97.8\n assert bbox.ymin == 30.2\n assert bbox.xmax == -97.6\n assert bbox.ymax == 30.4\n\n\ndef test_backend_enum():\n \"\"\"Test Backend enum values.\"\"\"\n assert Backend.geojson == \"geojson\"\n assert Backend.geojsonseq == \"geojsonseq\"\n assert Backend.geoparquet == \"geoparquet\"\n assert str(Backend.geojson) == \"geojson\"\n\n\ndef test_pipeline_state_serialization():\n \"\"\"Test PipelineState serialization and deserialization.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n # Serialize to dict\n data = state.as_dict()\n assert data[\"last_release\"] == \"2024-11-13.0\"\n assert data[\"theme\"] == \"buildings\"\n assert data[\"type\"] == \"building\"\n assert data[\"backend\"] == \"geoparquet\"\n assert data[\"bbox\"][\"xmin\"] == -97.8\n\n # Deserialize from dict\n restored = PipelineState.from_dict(data)\n assert restored.last_release == state.last_release\n assert restored.theme == state.theme\n assert restored.type == state.type\n assert restored.backend == state.backend\n assert restored.bbox.xmin == state.bbox.xmin\n assert restored.output == state.output\n\n\ndef test_pipeline_state_serialization_with_null_bbox():\n \"\"\"Test PipelineState serialization and deserialization with null bbox.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n data = state.as_dict()\n assert data[\"bbox\"] is None\n\n restored = PipelineState.from_dict(data)\n assert restored.bbox is None\n assert restored.last_release == state.last_release\n assert restored.output == state.output\n", + "tests/test_releases.py": "\"\"\"Tests for the releases module.\"\"\"\n\nimport pytest\nfrom botmap import releases\nfrom botmap.core import get_latest_release\n\n\ndef test_list_releases():\n \"\"\"Test that list_releases returns a non-empty list.\"\"\"\n all_releases = releases.list_releases()\n assert isinstance(all_releases, list)\n assert len(all_releases) > 0\n # Should be sorted newest first\n assert all_releases == sorted(all_releases, reverse=True)\n\n\ndef test_get_latest_release():\n \"\"\"Test that get_latest_release returns a valid release string.\"\"\"\n latest = get_latest_release()\n assert isinstance(latest, str)\n assert len(latest) > 0\n # Should be in the format YYYY-MM-DD.N\n assert \"-\" in latest\n assert \".\" in latest\n\n\ndef test_release_exists():\n \"\"\"Test release_exists with a known release.\"\"\"\n latest = get_latest_release()\n assert releases.release_exists(latest) is True\n assert releases.release_exists(\"invalid-release\") is False\n\n\ndef test_get_next_release():\n \"\"\"Test get_next_release logic.\"\"\"\n all_releases = releases.list_releases()\n if len(all_releases) < 2:\n pytest.skip(\"Need at least 2 releases to test get_next_release\")\n\n # Latest release should have no next release\n latest = all_releases[0]\n assert releases.get_next_release(latest) is None\n\n # Second-to-last release should return latest\n second_latest = all_releases[1]\n assert releases.get_next_release(second_latest) == latest\n\n # Invalid release should return None\n assert releases.get_next_release(\"invalid-release\") is None\n", + "tests/test_skill_installer.py": "\"\"\"Tests for the Skill installer module.\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom botmap.skill_installer import (\n install_claude_user,\n install_claude_project,\n install_agents_md,\n AGENTS_START_MARKER,\n AGENTS_END_MARKER,\n)\n\n\ndef test_install_claude_user_writes_skill_md(monkeypatch, tmp_path):\n monkeypatch.setenv(\"HOME\", str(tmp_path))\n monkeypatch.delenv(\"XDG_CONFIG_HOME\", raising=False)\n\n target = install_claude_user()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n text = target.read_text()\n assert \"name: botmap\" in text\n\n\ndef test_install_claude_project_uses_cwd(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_claude_project()\n assert target == tmp_path / \".claude\" / \"skills\" / \"botmap\" / \"SKILL.md\"\n assert target.exists()\n\n\ndef test_install_agents_md_creates_file(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n target = install_agents_md()\n assert target == tmp_path / \"AGENTS.md\"\n text = target.read_text()\n assert AGENTS_START_MARKER in text\n assert AGENTS_END_MARKER in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_replaces_existing_block(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\n \"# Project agent guide\\n\\n\"\n \"Some pre-existing content.\\n\\n\"\n f\"{AGENTS_START_MARKER}\\n\"\n \"old skill content\\n\"\n f\"{AGENTS_END_MARKER}\\n\\n\"\n \"More after.\\n\"\n )\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Some pre-existing content\" in text\n assert \"More after\" in text\n assert \"old skill content\" not in text\n assert \"Overture Maps CLI\" in text\n\n\ndef test_install_agents_md_appends_when_no_marker(tmp_path, monkeypatch):\n monkeypatch.chdir(tmp_path)\n agents = tmp_path / \"AGENTS.md\"\n agents.write_text(\"# Project guide\\n\\nExisting prose.\\n\")\n\n install_agents_md()\n\n text = agents.read_text()\n assert \"Existing prose\" in text\n assert AGENTS_START_MARKER in text\n assert \"Overture Maps CLI\" in text\n", + "tests/test_skill_resource.py": "\"\"\"The SKILL.md content must be readable via importlib.resources.\"\"\"\n\nfrom importlib import resources\n\n\ndef test_skill_md_present():\n files = resources.files(\"botmap\") / \"data\" / \"skill.md\"\n text = files.read_text()\n assert \"name: botmap\" in text\n assert \"When to reach for this CLI\" in text\n", + "tests/test_state.py": "\"\"\"Tests for the state module.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom botmap.models import BBox, Backend, PipelineState\nfrom botmap.state import get_state_path, load_state, save_state\n\n\ndef test_get_state_path():\n \"\"\"Test get_state_path() generates correct path.\"\"\"\n assert get_state_path(\"/tmp/output.parquet\") == Path(\"/tmp/output.parquet.state\")\n assert get_state_path(\"data.geojson\") == Path(\"data.geojson.state\")\n\n\ndef test_save_and_load_state():\n \"\"\"Test saving and loading pipeline state.\"\"\"\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test.state\"\n\n # Save state\n save_state(state, state_path)\n assert state_path.exists()\n\n # Load state\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.last_release == \"2024-11-13.0\"\n assert loaded.theme == \"buildings\"\n assert loaded.type == \"building\"\n assert loaded.backend == Backend.geoparquet\n assert loaded.bbox.xmin == -97.8\n assert loaded.output == \"/tmp/output.parquet\"\n\n\ndef test_load_state_nonexistent():\n \"\"\"Test loading state from non-existent file returns None.\"\"\"\n result = load_state(\"/nonexistent/path/state.json\")\n assert result is None\n\n\ndef test_load_state_invalid_json():\n \"\"\"Test loading state from invalid JSON returns None.\"\"\"\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".state\", delete=False) as f:\n f.write(\"invalid json {\")\n temp_path = f.name\n\n try:\n result = load_state(temp_path)\n assert result is None\n finally:\n Path(temp_path).unlink()\n\n\ndef test_save_state_creates_parent_directory():\n \"\"\"Test that save_state creates parent directories if needed.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"nested\" / \"path\" / \"state.json\"\n\n bbox = BBox(xmin=-97.8, ymin=30.2, xmax=-97.6, ymax=30.4)\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=bbox,\n backend=Backend.geoparquet,\n output=\"/tmp/output.parquet\",\n )\n\n save_state(state, state_path)\n assert state_path.exists()\n assert state_path.parent.exists()\n\n\ndef test_save_and_load_state_with_null_bbox():\n \"\"\"Test saving and loading pipeline state when bbox is null.\"\"\"\n state = PipelineState(\n last_release=\"2024-11-13.0\",\n last_run=\"2024-11-13T12:00:00Z\",\n theme=\"buildings\",\n type=\"building\",\n bbox=None,\n backend=Backend.geojson,\n output=\"/tmp/output.geojson\",\n )\n\n with tempfile.TemporaryDirectory() as tmpdir:\n state_path = Path(tmpdir) / \"test-null-bbox.state\"\n\n save_state(state, state_path)\n assert state_path.exists()\n\n with open(state_path, \"r\") as f:\n raw = json.load(f)\n assert raw[\"bbox\"] is None\n\n loaded = load_state(state_path)\n assert loaded is not None\n assert loaded.bbox is None\n assert loaded.output == \"/tmp/output.geojson\"\n", + "tests/test_writers.py": "\"\"\"Tests for writers.py \u2014 GeoJSON writer classes and get_writer factory.\"\"\"\n\nimport io\nimport json\n\nfrom botmap.writers import GeoJSONSeqWriter, GeoJSONWriter, get_writer\n\n\nclass TestGeoJSONSeqWriter:\n def test_write_single_feature(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"test\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"type\"] == \"Feature\"\n assert obj[\"geometry\"][\"type\"] == \"Point\"\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue().strip())\n assert \"empty\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"test\"\n\n def test_multiple_features_newline_separated(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n lines = [line for line in buf.getvalue().splitlines() if line.strip()]\n assert len(lines) == 2\n assert json.loads(lines[0])[\"id\"] == 1\n assert json.loads(lines[1])[\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n writer = GeoJSONSeqWriter(buf)\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": \"abc\", \"name\": \"n\"})\n obj = json.loads(buf.getvalue().strip())\n assert obj[\"id\"] == \"abc\"\n assert \"id\" not in obj[\"properties\"]\n assert obj[\"properties\"][\"name\"] == \"n\"\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONSeqWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {})\n assert writer.is_open is False\n\n\nclass TestGeoJSONWriter:\n def test_empty_produces_valid_feature_collection(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n obj = json.loads(buf.getvalue())\n assert obj[\"type\"] == \"FeatureCollection\"\n assert obj[\"features\"] == []\n\n def test_single_feature(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"name\": \"a\"}\n )\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 1\n assert obj[\"features\"][0][\"type\"] == \"Feature\"\n assert obj[\"features\"][0][\"properties\"][\"name\"] == \"a\"\n\n def test_multiple_features_valid_json(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[0,0]}', {\"id\": 1})\n writer.write_feature('{\"type\":\"Point\",\"coordinates\":[1,1]}', {\"id\": 2})\n obj = json.loads(buf.getvalue())\n assert len(obj[\"features\"]) == 2\n assert obj[\"features\"][1][\"id\"] == 2\n\n def test_writes_top_level_id_not_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"id\": \"abc\", \"name\": \"n\"},\n )\n feature = json.loads(buf.getvalue())[\"features\"][0]\n assert feature[\"id\"] == \"abc\"\n assert \"id\" not in feature[\"properties\"]\n assert feature[\"properties\"][\"name\"] == \"n\"\n\n def test_filters_none_properties(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n writer.write_feature(\n '{\"type\":\"Point\",\"coordinates\":[0,0]}',\n {\"name\": \"test\", \"empty\": None},\n )\n obj = json.loads(buf.getvalue())\n assert \"empty\" not in obj[\"features\"][0][\"properties\"]\n\n def test_context_manager_closes_cleanly(self):\n buf = io.StringIO()\n with GeoJSONWriter(buf) as writer:\n pass\n assert writer.is_open is False\n\n\nclass TestGetWriter:\n def test_geojson_returns_geojson_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojson\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONWriter)\n\n def test_geojsonseq_returns_geojsonseq_writer(self):\n buf = io.StringIO()\n with get_writer(\"geojsonseq\", buf, schema=None) as writer:\n assert isinstance(writer, GeoJSONSeqWriter)\n", + "uv.lock": "version = 1\nrevision = 3\nrequires-python = \">=3.10\"\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n \"python_full_version < '3.11'\",\n]\n\n[[package]]\nname = \"altgraph\"\nversion = \"0.17.5\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz\", hash = \"sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7\", size = 48428, upload-time = \"2025-11-21T20:35:50.583Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl\", hash = \"sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597\", size = 21228, upload-time = \"2025-11-21T20:35:49.444Z\" },\n]\n\n[[package]]\nname = \"botmap\"\nversion = \"0.1.2\"\nsource = { editable = \".\" }\ndependencies = [\n { name = \"click\" },\n { name = \"colorama\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"orjson\" },\n { name = \"pyarrow\" },\n { name = \"pyfiglet\" },\n { name = \"shapely\" },\n { name = \"tqdm\" },\n]\n\n[package.optional-dependencies]\ngeopandas = [\n { name = \"geopandas\" },\n]\n\n[package.dev-dependencies]\nbinary = [\n { name = \"pyinstaller\" },\n { name = \"pyinstaller-hooks-contrib\" },\n]\ndev = [\n { name = \"pytest\" },\n { name = \"pytest-benchmark\" },\n { name = \"pytest-mock\" },\n { name = \"pyyaml\" },\n]\n\n[package.metadata]\nrequires-dist = [\n { name = \"click\", specifier = \">=8.3.0\" },\n { name = \"colorama\", specifier = \">=0.4.6\" },\n { name = \"geopandas\", marker = \"extra == 'geopandas'\", specifier = \">=1.1.0\" },\n { name = \"numpy\", specifier = \">=1.26.4\" },\n { name = \"orjson\", specifier = \">=3.9.0\" },\n { name = \"pyarrow\", specifier = \">=15.0.2\" },\n { name = \"pyfiglet\", specifier = \">=1.0.2\" },\n { name = \"shapely\", specifier = \">=2.1.0\" },\n { name = \"tqdm\", specifier = \">=4.67.3\" },\n]\nprovides-extras = [\"geopandas\"]\n\n[package.metadata.requires-dev]\nbinary = [\n { name = \"pyinstaller\", specifier = \">=6.0\" },\n { name = \"pyinstaller-hooks-contrib\", specifier = \">=2024.10\" },\n]\ndev = [\n { name = \"pytest\", specifier = \">=8.0.0\" },\n { name = \"pytest-benchmark\", specifier = \">=5.0.0\" },\n { name = \"pytest-mock\", specifier = \">=3.11.0\" },\n { name = \"pyyaml\", specifier = \">=6.0.3\" },\n]\n\n[[package]]\nname = \"certifi\"\nversion = \"2026.1.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz\", hash = \"sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120\", size = 154268, upload-time = \"2026-01-04T02:42:41.825Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl\", hash = \"sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c\", size = 152900, upload-time = \"2026-01-04T02:42:40.15Z\" },\n]\n\n[[package]]\nname = \"click\"\nversion = \"8.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz\", hash = \"sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a\", size = 295065, upload-time = \"2025-11-15T20:45:42.706Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl\", hash = \"sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6\", size = 108274, upload-time = \"2025-11-15T20:45:41.139Z\" },\n]\n\n[[package]]\nname = \"colorama\"\nversion = \"0.4.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz\", hash = \"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44\", size = 27697, upload-time = \"2022-10-25T02:36:22.414Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl\", hash = \"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6\", size = 25335, upload-time = \"2022-10-25T02:36:20.889Z\" },\n]\n\n[[package]]\nname = \"exceptiongroup\"\nversion = \"1.3.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"typing-extensions\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz\", hash = \"sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219\", size = 30371, upload-time = \"2025-11-21T23:01:54.787Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl\", hash = \"sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598\", size = 16740, upload-time = \"2025-11-21T23:01:53.443Z\" },\n]\n\n[[package]]\nname = \"geopandas\"\nversion = \"1.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n { name = \"pandas\" },\n { name = \"pyogrio\" },\n { name = \"pyproj\", version = \"3.7.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"pyproj\", version = \"3.7.2\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"shapely\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/8d/24/5eb5685d7bf89d64218919379f882d19a60f8219d66d833c83b1cf264c95/geopandas-1.1.2.tar.gz\", hash = \"sha256:33f7b33565c46a45b8459a2ab699ec943fdbb5716e58e251b3c413cf7783106c\", size = 336037, upload-time = \"2025-12-22T21:06:13.749Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/e4/fac19dc34cb686c96011388b813ff7b858a70681e5ce6ce7698e5021b0f4/geopandas-1.1.2-py3-none-any.whl\", hash = \"sha256:2bb0b1052cb47378addb4ba54c47f8d4642dcbda9b61375638274f49d9f0bb0d\", size = 341734, upload-time = \"2025-12-22T21:06:12.498Z\" },\n]\n\n[[package]]\nname = \"iniconfig\"\nversion = \"2.3.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz\", hash = \"sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730\", size = 20503, upload-time = \"2025-10-18T21:55:43.219Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl\", hash = \"sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12\", size = 7484, upload-time = \"2025-10-18T21:55:41.639Z\" },\n]\n\n[[package]]\nname = \"macholib\"\nversion = \"1.16.4\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz\", hash = \"sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362\", size = 59427, upload-time = \"2025-11-22T08:28:38.373Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl\", hash = \"sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea\", size = 38117, upload-time = \"2025-11-22T08:28:36.939Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.2.6\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz\", hash = \"sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd\", size = 20276440, upload-time = \"2025-05-17T22:38:04.611Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb\", size = 21165245, upload-time = \"2025-05-17T21:27:58.555Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90\", size = 14360048, upload-time = \"2025-05-17T21:28:21.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163\", size = 5340542, upload-time = \"2025-05-17T21:28:30.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl\", hash = \"sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf\", size = 6878301, upload-time = \"2025-05-17T21:28:41.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83\", size = 14297320, upload-time = \"2025-05-17T21:29:02.78Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915\", size = 16801050, upload-time = \"2025-05-17T21:29:27.675Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680\", size = 15807034, upload-time = \"2025-05-17T21:29:51.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289\", size = 18614185, upload-time = \"2025-05-17T21:30:18.703Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl\", hash = \"sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d\", size = 6527149, upload-time = \"2025-05-17T21:30:29.788Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl\", hash = \"sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3\", size = 12904620, upload-time = \"2025-05-17T21:30:48.994Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae\", size = 21176963, upload-time = \"2025-05-17T21:31:19.36Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a\", size = 14406743, upload-time = \"2025-05-17T21:31:41.087Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42\", size = 5352616, upload-time = \"2025-05-17T21:31:50.072Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491\", size = 6889579, upload-time = \"2025-05-17T21:32:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a\", size = 14312005, upload-time = \"2025-05-17T21:32:23.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf\", size = 16821570, upload-time = \"2025-05-17T21:32:47.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1\", size = 15818548, upload-time = \"2025-05-17T21:33:11.728Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab\", size = 18620521, upload-time = \"2025-05-17T21:33:39.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl\", hash = \"sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47\", size = 6525866, upload-time = \"2025-05-17T21:33:50.273Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl\", hash = \"sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303\", size = 12907455, upload-time = \"2025-05-17T21:34:09.135Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff\", size = 20875348, upload-time = \"2025-05-17T21:34:39.648Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c\", size = 14119362, upload-time = \"2025-05-17T21:35:01.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3\", size = 5084103, upload-time = \"2025-05-17T21:35:10.622Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282\", size = 6625382, upload-time = \"2025-05-17T21:35:21.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87\", size = 14018462, upload-time = \"2025-05-17T21:35:42.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249\", size = 16527618, upload-time = \"2025-05-17T21:36:06.711Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49\", size = 15505511, upload-time = \"2025-05-17T21:36:29.965Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de\", size = 18313783, upload-time = \"2025-05-17T21:36:56.883Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl\", hash = \"sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4\", size = 6246506, upload-time = \"2025-05-17T21:37:07.368Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl\", hash = \"sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2\", size = 12614190, upload-time = \"2025-05-17T21:37:26.213Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84\", size = 20867828, upload-time = \"2025-05-17T21:37:56.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b\", size = 14143006, upload-time = \"2025-05-17T21:38:18.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d\", size = 5076765, upload-time = \"2025-05-17T21:38:27.319Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566\", size = 6617736, upload-time = \"2025-05-17T21:38:38.141Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f\", size = 14010719, upload-time = \"2025-05-17T21:38:58.433Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f\", size = 16526072, upload-time = \"2025-05-17T21:39:22.638Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868\", size = 15503213, upload-time = \"2025-05-17T21:39:45.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d\", size = 18316632, upload-time = \"2025-05-17T21:40:13.331Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl\", hash = \"sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd\", size = 6244532, upload-time = \"2025-05-17T21:43:46.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl\", hash = \"sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c\", size = 12610885, upload-time = \"2025-05-17T21:44:05.145Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6\", size = 20963467, upload-time = \"2025-05-17T21:40:44Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda\", size = 14225144, upload-time = \"2025-05-17T21:41:05.695Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40\", size = 5200217, upload-time = \"2025-05-17T21:41:15.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8\", size = 6712014, upload-time = \"2025-05-17T21:41:27.321Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f\", size = 14077935, upload-time = \"2025-05-17T21:41:49.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa\", size = 16600122, upload-time = \"2025-05-17T21:42:14.046Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571\", size = 15586143, upload-time = \"2025-05-17T21:42:37.464Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1\", size = 18385260, upload-time = \"2025-05-17T21:43:05.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl\", hash = \"sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff\", size = 6377225, upload-time = \"2025-05-17T21:43:16.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl\", hash = \"sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06\", size = 12771374, upload-time = \"2025-05-17T21:43:35.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d\", size = 21040391, upload-time = \"2025-05-17T21:44:35.948Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db\", size = 6786754, upload-time = \"2025-05-17T21:44:47.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543\", size = 16643476, upload-time = \"2025-05-17T21:45:11.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl\", hash = \"sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00\", size = 12812666, upload-time = \"2025-05-17T21:45:31.426Z\" },\n]\n\n[[package]]\nname = \"numpy\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz\", hash = \"sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690\", size = 20721320, upload-time = \"2026-01-10T06:44:59.619Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5\", size = 16944563, upload-time = \"2026-01-10T06:42:14.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425\", size = 12645658, upload-time = \"2026-01-10T06:42:17.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba\", size = 5474132, upload-time = \"2026-01-10T06:42:19.637Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl\", hash = \"sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501\", size = 6804159, upload-time = \"2026-01-10T06:42:21.44Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a\", size = 14708058, upload-time = \"2026-01-10T06:42:23.546Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509\", size = 16651501, upload-time = \"2026-01-10T06:42:25.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc\", size = 16492627, upload-time = \"2026-01-10T06:42:28.938Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82\", size = 18585052, upload-time = \"2026-01-10T06:42:31.312Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0\", size = 6236575, upload-time = \"2026-01-10T06:42:33.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574\", size = 12604479, upload-time = \"2026-01-10T06:42:35.778Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73\", size = 10578325, upload-time = \"2026-01-10T06:42:38.518Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2\", size = 16656888, upload-time = \"2026-01-10T06:42:40.913Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8\", size = 12373956, upload-time = \"2026-01-10T06:42:43.091Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a\", size = 5202567, upload-time = \"2026-01-10T06:42:45.107Z\" },\n { url = \"https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl\", hash = \"sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0\", size = 6549459, upload-time = \"2026-01-10T06:42:48.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c\", size = 14404859, upload-time = \"2026-01-10T06:42:49.947Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02\", size = 16371419, upload-time = \"2026-01-10T06:42:52.409Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162\", size = 16182131, upload-time = \"2026-01-10T06:42:54.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9\", size = 18295342, upload-time = \"2026-01-10T06:42:56.991Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f\", size = 5959015, upload-time = \"2026-01-10T06:42:59.631Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87\", size = 12310730, upload-time = \"2026-01-10T06:43:01.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8\", size = 10312166, upload-time = \"2026-01-10T06:43:03.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b\", size = 16652495, upload-time = \"2026-01-10T06:43:06.283Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f\", size = 12368657, upload-time = \"2026-01-10T06:43:09.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9\", size = 5197256, upload-time = \"2026-01-10T06:43:13.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl\", hash = \"sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e\", size = 6545212, upload-time = \"2026-01-10T06:43:15.661Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5\", size = 14402871, upload-time = \"2026-01-10T06:43:17.324Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8\", size = 16359305, upload-time = \"2026-01-10T06:43:19.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c\", size = 16181909, upload-time = \"2026-01-10T06:43:21.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2\", size = 18284380, upload-time = \"2026-01-10T06:43:23.957Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d\", size = 5957089, upload-time = \"2026-01-10T06:43:27.535Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb\", size = 12307230, upload-time = \"2026-01-10T06:43:29.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5\", size = 10313125, upload-time = \"2026-01-10T06:43:31.782Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7\", size = 12496156, upload-time = \"2026-01-10T06:43:34.237Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d\", size = 5324663, upload-time = \"2026-01-10T06:43:36.211Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl\", hash = \"sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15\", size = 6645224, upload-time = \"2026-01-10T06:43:37.884Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9\", size = 14462352, upload-time = \"2026-01-10T06:43:39.479Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2\", size = 16407279, upload-time = \"2026-01-10T06:43:41.93Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505\", size = 16248316, upload-time = \"2026-01-10T06:43:44.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2\", size = 18329884, upload-time = \"2026-01-10T06:43:46.613Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl\", hash = \"sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4\", size = 6081138, upload-time = \"2026-01-10T06:43:48.854Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510\", size = 12447478, upload-time = \"2026-01-10T06:43:50.476Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl\", hash = \"sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261\", size = 10382981, upload-time = \"2026-01-10T06:43:52.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc\", size = 16652046, upload-time = \"2026-01-10T06:43:54.797Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3\", size = 12378858, upload-time = \"2026-01-10T06:43:57.099Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220\", size = 5207417, upload-time = \"2026-01-10T06:43:59.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl\", hash = \"sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee\", size = 6542643, upload-time = \"2026-01-10T06:44:01.852Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556\", size = 14418963, upload-time = \"2026-01-10T06:44:04.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844\", size = 16363811, upload-time = \"2026-01-10T06:44:06.207Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3\", size = 16197643, upload-time = \"2026-01-10T06:44:08.33Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205\", size = 18289601, upload-time = \"2026-01-10T06:44:10.841Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745\", size = 6005722, upload-time = \"2026-01-10T06:44:13.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d\", size = 12438590, upload-time = \"2026-01-10T06:44:15.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df\", size = 10596180, upload-time = \"2026-01-10T06:44:17.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f\", size = 12498774, upload-time = \"2026-01-10T06:44:19.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0\", size = 5327274, upload-time = \"2026-01-10T06:44:23.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl\", hash = \"sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c\", size = 6648306, upload-time = \"2026-01-10T06:44:25.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93\", size = 14464653, upload-time = \"2026-01-10T06:44:26.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42\", size = 16405144, upload-time = \"2026-01-10T06:44:29.378Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01\", size = 16247425, upload-time = \"2026-01-10T06:44:31.721Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b\", size = 18330053, upload-time = \"2026-01-10T06:44:34.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a\", size = 6152482, upload-time = \"2026-01-10T06:44:36.798Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2\", size = 12627117, upload-time = \"2026-01-10T06:44:38.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295\", size = 10667121, upload-time = \"2026-01-10T06:44:41.644Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl\", hash = \"sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1\", size = 16822202, upload-time = \"2026-01-10T06:44:43.738Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl\", hash = \"sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344\", size = 12569985, upload-time = \"2026-01-10T06:44:45.945Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl\", hash = \"sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e\", size = 5398484, upload-time = \"2026-01-10T06:44:48.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl\", hash = \"sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426\", size = 6713216, upload-time = \"2026-01-10T06:44:49.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696\", size = 14538937, upload-time = \"2026-01-10T06:44:51.498Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be\", size = 16479830, upload-time = \"2026-01-10T06:44:53.931Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl\", hash = \"sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33\", size = 12492579, upload-time = \"2026-01-10T06:44:57.094Z\" },\n]\n\n[[package]]\nname = \"orjson\"\nversion = \"3.11.7\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz\", hash = \"sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49\", size = 6144992, upload-time = \"2026-02-02T15:38:49.29Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174\", size = 229140, upload-time = \"2026-02-02T15:37:06.082Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67\", size = 128670, upload-time = \"2026-02-02T15:37:08.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11\", size = 123832, upload-time = \"2026-02-02T15:37:09.191Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc\", size = 129171, upload-time = \"2026-02-02T15:37:11.112Z\" },\n { url = \"https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16\", size = 141967, upload-time = \"2026-02-02T15:37:12.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222\", size = 130991, upload-time = \"2026-02-02T15:37:13.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa\", size = 133674, upload-time = \"2026-02-02T15:37:14.694Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e\", size = 138722, upload-time = \"2026-02-02T15:37:16.501Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl\", hash = \"sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2\", size = 409056, upload-time = \"2026-02-02T15:37:17.895Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl\", hash = \"sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c\", size = 144196, upload-time = \"2026-02-02T15:37:19.349Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f\", size = 134979, upload-time = \"2026-02-02T15:37:20.906Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl\", hash = \"sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de\", size = 127968, upload-time = \"2026-02-02T15:37:23.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl\", hash = \"sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993\", size = 125128, upload-time = \"2026-02-02T15:37:24.329Z\" },\n { url = \"https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c\", size = 228664, upload-time = \"2026-02-02T15:37:25.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl\", hash = \"sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b\", size = 125344, upload-time = \"2026-02-02T15:37:26.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e\", size = 128404, upload-time = \"2026-02-02T15:37:28.108Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5\", size = 123677, upload-time = \"2026-02-02T15:37:30.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62\", size = 128950, upload-time = \"2026-02-02T15:37:31.595Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910\", size = 141756, upload-time = \"2026-02-02T15:37:32.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b\", size = 130812, upload-time = \"2026-02-02T15:37:34.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960\", size = 133444, upload-time = \"2026-02-02T15:37:35.446Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8\", size = 138609, upload-time = \"2026-02-02T15:37:36.657Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl\", hash = \"sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504\", size = 408918, upload-time = \"2026-02-02T15:37:38.076Z\" },\n { url = \"https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl\", hash = \"sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e\", size = 143998, upload-time = \"2026-02-02T15:37:39.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561\", size = 134802, upload-time = \"2026-02-02T15:37:41.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl\", hash = \"sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d\", size = 127828, upload-time = \"2026-02-02T15:37:42.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl\", hash = \"sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471\", size = 124941, upload-time = \"2026-02-02T15:37:43.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl\", hash = \"sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d\", size = 126245, upload-time = \"2026-02-02T15:37:45.18Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f\", size = 228545, upload-time = \"2026-02-02T15:37:46.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl\", hash = \"sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b\", size = 125224, upload-time = \"2026-02-02T15:37:47.697Z\" },\n { url = \"https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a\", size = 128154, upload-time = \"2026-02-02T15:37:48.954Z\" },\n { url = \"https://files.pythonhosted.org/packages/6e/52/a66e22a2b9abaa374b4a081d410edab6d1e30024707b87eab7c734afe28d/orjson-3.11.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:b7b1dae39230a393df353827c855a5f176271c23434cfd2db74e0e424e693e10\", size = 123548, upload-time = \"2026-02-02T15:37:50.187Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/38/605d371417021359f4910c496f764c48ceb8997605f8c25bf1dfe58c0ebe/orjson-3.11.7-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:ed46f17096e28fb28d2975834836a639af7278aa87c84f68ab08fbe5b8bd75fa\", size = 129000, upload-time = \"2026-02-02T15:37:51.426Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/98/af32e842b0ffd2335c89714d48ca4e3917b42f5d6ee5537832e069a4b3ac/orjson-3.11.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:3726be79e36e526e3d9c1aceaadbfb4a04ee80a72ab47b3f3c17fefb9812e7b8\", size = 141686, upload-time = \"2026-02-02T15:37:52.607Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/0b/fc793858dfa54be6feee940c1463370ece34b3c39c1ca0aa3845f5ba9892/orjson-3.11.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:0724e265bc548af1dedebd9cb3d24b4e1c1e685a343be43e87ba922a5c5fff2f\", size = 130812, upload-time = \"2026-02-02T15:37:53.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/91/98a52415059db3f374757d0b7f0f16e3b5cd5976c90d1c2b56acaea039e6/orjson-3.11.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:e7745312efa9e11c17fbd3cb3097262d079da26930ae9ae7ba28fb738367cbad\", size = 133440, upload-time = \"2026-02-02T15:37:55.615Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/b6/cb540117bda61791f46381f8c26c8f93e802892830a6055748d3bb1925ab/orjson-3.11.7-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:f904c24bdeabd4298f7a977ef14ca2a022ca921ed670b92ecd16ab6f3d01f867\", size = 138386, upload-time = \"2026-02-02T15:37:56.814Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/1a/50a3201c334a7f17c231eee5f841342190723794e3b06293f26e7cf87d31/orjson-3.11.7-cp312-cp312-musllinux_1_2_armv7l.whl\", hash = \"sha256:b9fc4d0f81f394689e0814617aadc4f2ea0e8025f38c226cbf22d3b5ddbf025d\", size = 408853, upload-time = \"2026-02-02T15:37:58.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/cd/8de1c67d0be44fdc22701e5989c0d015a2adf391498ad42c4dc589cd3013/orjson-3.11.7-cp312-cp312-musllinux_1_2_i686.whl\", hash = \"sha256:849e38203e5be40b776ed2718e587faf204d184fc9a008ae441f9442320c0cab\", size = 144130, upload-time = \"2026-02-02T15:38:00.163Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/fe/d605d700c35dd55f51710d159fc54516a280923cd1b7e47508982fbb387d/orjson-3.11.7-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:4682d1db3bcebd2b64757e0ddf9e87ae5f00d29d16c5cdf3a62f561d08cc3dd2\", size = 134818, upload-time = \"2026-02-02T15:38:01.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/15ecc67edb3ddb3e2f46ae04475f2d294e8b60c1825fbe28a428b93b3fbd/orjson-3.11.7-cp312-cp312-win32.whl\", hash = \"sha256:f4f7c956b5215d949a1f65334cf9d7612dde38f20a95f2315deef167def91a6f\", size = 127923, upload-time = \"2026-02-02T15:38:02.75Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/70/2e0855361f76198a3965273048c8e50a9695d88cd75811a5b46444895845/orjson-3.11.7-cp312-cp312-win_amd64.whl\", hash = \"sha256:bf742e149121dc5648ba0a08ea0871e87b660467ef168a3a5e53bc1fbd64bb74\", size = 125007, upload-time = \"2026-02-02T15:38:04.032Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/40/c2051bd19fc467610fed469dc29e43ac65891571138f476834ca192bc290/orjson-3.11.7-cp312-cp312-win_arm64.whl\", hash = \"sha256:26c3b9132f783b7d7903bf1efb095fed8d4a3a85ec0d334ee8beff3d7a4749d5\", size = 126089, upload-time = \"2026-02-02T15:38:05.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/6e0e52cac5aab51d7b6dcd257e855e1dec1c2060f6b28566c509b4665f62/orjson-3.11.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:1d98b30cc1313d52d4af17d9c3d307b08389752ec5f2e5febdfada70b0f8c733\", size = 228390, upload-time = \"2026-02-02T15:38:06.8Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/29/a77f48d2fc8a05bbc529e5ff481fb43d914f9e383ea2469d4f3d51df3d00/orjson-3.11.7-cp313-cp313-macosx_15_0_arm64.whl\", hash = \"sha256:d897e81f8d0cbd2abb82226d1860ad2e1ab3ff16d7b08c96ca00df9d45409ef4\", size = 125189, upload-time = \"2026-02-02T15:38:08.181Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/25/0a16e0729a0e6a1504f9d1a13cdd365f030068aab64cec6958396b9969d7/orjson-3.11.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:814be4b49b228cfc0b3c565acf642dd7d13538f966e3ccde61f4f55be3e20785\", size = 128106, upload-time = \"2026-02-02T15:38:09.41Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/da/a2e505469d60666a05ab373f1a6322eb671cb2ba3a0ccfc7d4bc97196787/orjson-3.11.7-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:d06e5c5fed5caedd2e540d62e5b1c25e8c82431b9e577c33537e5fa4aa909539\", size = 123363, upload-time = \"2026-02-02T15:38:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/bf/ed73f88396ea35c71b38961734ea4a4746f7ca0768bf28fd551d37e48dd0/orjson-3.11.7-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:31c80ce534ac4ea3739c5ee751270646cbc46e45aea7576a38ffec040b4029a1\", size = 129007, upload-time = \"2026-02-02T15:38:12.138Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/3c/b05d80716f0225fc9008fbf8ab22841dcc268a626aa550561743714ce3bf/orjson-3.11.7-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:f50979824bde13d32b4320eedd513431c921102796d86be3eee0b58e58a3ecd1\", size = 141667, upload-time = \"2026-02-02T15:38:13.398Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/e8/0be9b0addd9bf86abfc938e97441dcd0375d494594b1c8ad10fe57479617/orjson-3.11.7-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:9e54f3808e2b6b945078c41aa8d9b5834b28c50843846e97807e5adb75fa9705\", size = 130832, upload-time = \"2026-02-02T15:38:14.698Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/ec/c68e3b9021a31d9ec15a94931db1410136af862955854ed5dd7e7e4f5bff/orjson-3.11.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a12b80df61aab7b98b490fe9e4879925ba666fccdfcd175252ce4d9035865ace\", size = 133373, upload-time = \"2026-02-02T15:38:16.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/d2/45/f3466739aaafa570cc8e77c6dbb853c48bf56e3b43738020e2661e08b0ac/orjson-3.11.7-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:996b65230271f1a97026fd0e6a753f51fbc0c335d2ad0c6201f711b0da32693b\", size = 138307, upload-time = \"2026-02-02T15:38:17.453Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/84/9f7f02288da1ffb31405c1be07657afd1eecbcb4b64ee2817b6fe0f785fa/orjson-3.11.7-cp313-cp313-musllinux_1_2_armv7l.whl\", hash = \"sha256:ab49d4b2a6a1d415ddb9f37a21e02e0d5dbfe10b7870b21bf779fc21e9156157\", size = 408695, upload-time = \"2026-02-02T15:38:18.831Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/07/9dd2f0c0104f1a0295ffbe912bc8d63307a539b900dd9e2c48ef7810d971/orjson-3.11.7-cp313-cp313-musllinux_1_2_i686.whl\", hash = \"sha256:390a1dce0c055ddf8adb6aa94a73b45a4a7d7177b5c584b8d1c1947f2ba60fb3\", size = 144099, upload-time = \"2026-02-02T15:38:20.28Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/66/857a8e4a3292e1f7b1b202883bcdeb43a91566cf59a93f97c53b44bd6801/orjson-3.11.7-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:1eb80451a9c351a71dfaf5b7ccc13ad065405217726b59fdbeadbcc544f9d223\", size = 134806, upload-time = \"2026-02-02T15:38:22.186Z\" },\n { url = \"https://files.pythonhosted.org/packages/0a/5b/6ebcf3defc1aab3a338ca777214966851e92efb1f30dc7fc8285216e6d1b/orjson-3.11.7-cp313-cp313-win32.whl\", hash = \"sha256:7477aa6a6ec6139c5cb1cc7b214643592169a5494d200397c7fc95d740d5fcf3\", size = 127914, upload-time = \"2026-02-02T15:38:23.511Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/04/c6f72daca5092e3117840a1b1e88dfc809cc1470cf0734890d0366b684a1/orjson-3.11.7-cp313-cp313-win_amd64.whl\", hash = \"sha256:b9f95dcdea9d4f805daa9ddf02617a89e484c6985fa03055459f90e87d7a0757\", size = 124986, upload-time = \"2026-02-02T15:38:24.836Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/ba/077a0f6f1085d6b806937246860fafbd5b17f3919c70ee3f3d8d9c713f38/orjson-3.11.7-cp313-cp313-win_arm64.whl\", hash = \"sha256:800988273a014a0541483dc81021247d7eacb0c845a9d1a34a422bc718f41539\", size = 126045, upload-time = \"2026-02-02T15:38:26.216Z\" },\n { url = \"https://files.pythonhosted.org/packages/e9/1e/745565dca749813db9a093c5ebc4bac1a9475c64d54b95654336ac3ed961/orjson-3.11.7-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl\", hash = \"sha256:de0a37f21d0d364954ad5de1970491d7fbd0fb1ef7417d4d56a36dc01ba0c0a0\", size = 228391, upload-time = \"2026-02-02T15:38:27.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/19/e40f6225da4d3aa0c8dc6e5219c5e87c2063a560fe0d72a88deb59776794/orjson-3.11.7-cp314-cp314-macosx_15_0_arm64.whl\", hash = \"sha256:c2428d358d85e8da9d37cba18b8c4047c55222007a84f97156a5b22028dfbfc0\", size = 125188, upload-time = \"2026-02-02T15:38:29.241Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/7e/c4de2babef2c0817fd1f048fd176aa48c37bec8aef53d2fa932983032cce/orjson-3.11.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:3c4bc6c6ac52cdaa267552544c73e486fecbd710b7ac09bc024d5a78555a22f6\", size = 128097, upload-time = \"2026-02-02T15:38:30.618Z\" },\n { url = \"https://files.pythonhosted.org/packages/eb/74/233d360632bafd2197f217eee7fb9c9d0229eac0c18128aee5b35b0014fe/orjson-3.11.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl\", hash = \"sha256:bd0d68edd7dfca1b2eca9361a44ac9f24b078de3481003159929a0573f21a6bf\", size = 123364, upload-time = \"2026-02-02T15:38:32.363Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/51/af79504981dd31efe20a9e360eb49c15f06df2b40e7f25a0a52d9ae888e8/orjson-3.11.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl\", hash = \"sha256:623ad1b9548ef63886319c16fa317848e465a21513b31a6ad7b57443c3e0dcf5\", size = 129076, upload-time = \"2026-02-02T15:38:33.68Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/e2/da898eb68b72304f8de05ca6715870d09d603ee98d30a27e8a9629abc64b/orjson-3.11.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl\", hash = \"sha256:6e776b998ac37c0396093d10290e60283f59cfe0fc3fccbd0ccc4bd04dd19892\", size = 141705, upload-time = \"2026-02-02T15:38:34.989Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/89/15364d92acb3d903b029e28d834edb8780c2b97404cbf7929aa6b9abdb24/orjson-3.11.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl\", hash = \"sha256:652c6c3af76716f4a9c290371ba2e390ede06f6603edb277b481daf37f6f464e\", size = 130855, upload-time = \"2026-02-02T15:38:36.379Z\" },\n { url = \"https://files.pythonhosted.org/packages/c2/8b/ecdad52d0b38d4b8f514be603e69ccd5eacf4e7241f972e37e79792212ec/orjson-3.11.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:a56df3239294ea5964adf074c54bcc4f0ccd21636049a2cf3ca9cf03b5d03cf1\", size = 133386, upload-time = \"2026-02-02T15:38:37.704Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/0e/45e1dcf10e17d0924b7c9162f87ec7b4ca79e28a0548acf6a71788d3e108/orjson-3.11.7-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:bda117c4148e81f746655d5a3239ae9bd00cb7bc3ca178b5fc5a5997e9744183\", size = 138295, upload-time = \"2026-02-02T15:38:39.096Z\" },\n { url = \"https://files.pythonhosted.org/packages/63/d7/4d2e8b03561257af0450f2845b91fbd111d7e526ccdf737267108075e0ba/orjson-3.11.7-cp314-cp314-musllinux_1_2_armv7l.whl\", hash = \"sha256:23d6c20517a97a9daf1d48b580fcdc6f0516c6f4b5038823426033690b4d2650\", size = 408720, upload-time = \"2026-02-02T15:38:40.634Z\" },\n { url = \"https://files.pythonhosted.org/packages/78/cf/d45343518282108b29c12a65892445fc51f9319dc3c552ceb51bb5905ed2/orjson-3.11.7-cp314-cp314-musllinux_1_2_i686.whl\", hash = \"sha256:8ff206156006da5b847c9304b6308a01e8cdbc8cce824e2779a5ba71c3def141\", size = 144152, upload-time = \"2026-02-02T15:38:42.262Z\" },\n { url = \"https://files.pythonhosted.org/packages/a9/3a/d6001f51a7275aacd342e77b735c71fa04125a3f93c36fee4526bc8c654e/orjson-3.11.7-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:962d046ee1765f74a1da723f4b33e3b228fe3a48bd307acce5021dfefe0e29b2\", size = 134814, upload-time = \"2026-02-02T15:38:43.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/d3/f19b47ce16820cc2c480f7f1723e17f6d411b3a295c60c8ad3aa9ff1c96a/orjson-3.11.7-cp314-cp314-win32.whl\", hash = \"sha256:89e13dd3f89f1c38a9c9eba5fbf7cdc2d1feca82f5f290864b4b7a6aac704576\", size = 127997, upload-time = \"2026-02-02T15:38:45.06Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/df/172771902943af54bf661a8d102bdf2e7f932127968080632bda6054b62c/orjson-3.11.7-cp314-cp314-win_amd64.whl\", hash = \"sha256:845c3e0d8ded9c9271cd79596b9b552448b885b97110f628fb687aee2eed11c1\", size = 124985, upload-time = \"2026-02-02T15:38:46.388Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/1c/f2a8d8a1b17514660a614ce5f7aac74b934e69f5abc2700cc7ced882a009/orjson-3.11.7-cp314-cp314-win_arm64.whl\", hash = \"sha256:4a2e9c5be347b937a2e0203866f12bba36082e89b402ddb9e927d5822e43088d\", size = 126038, upload-time = \"2026-02-02T15:38:47.703Z\" },\n]\n\n[[package]]\nname = \"packaging\"\nversion = \"25.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz\", hash = \"sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f\", size = 165727, upload-time = \"2025-04-19T11:48:59.673Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl\", hash = \"sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484\", size = 66469, upload-time = \"2025-04-19T11:48:57.875Z\" },\n]\n\n[[package]]\nname = \"pandas\"\nversion = \"2.3.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"python-dateutil\" },\n { name = \"pytz\" },\n { name = \"tzdata\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz\", hash = \"sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b\", size = 4495223, upload-time = \"2025-09-29T23:34:51.853Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c\", size = 11555763, upload-time = \"2025-09-29T23:16:53.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a\", size = 10801217, upload-time = \"2025-09-29T23:17:04.522Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1\", size = 12148791, upload-time = \"2025-09-29T23:17:18.444Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838\", size = 12769373, upload-time = \"2025-09-29T23:17:35.846Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250\", size = 13200444, upload-time = \"2025-09-29T23:17:49.341Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4\", size = 13858459, upload-time = \"2025-09-29T23:18:03.722Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826\", size = 11346086, upload-time = \"2025-09-29T23:18:18.505Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523\", size = 11578790, upload-time = \"2025-09-29T23:18:30.065Z\" },\n { url = \"https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45\", size = 10833831, upload-time = \"2025-09-29T23:38:56.071Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66\", size = 12199267, upload-time = \"2025-09-29T23:18:41.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b\", size = 12789281, upload-time = \"2025-09-29T23:18:56.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791\", size = 13240453, upload-time = \"2025-09-29T23:19:09.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151\", size = 13890361, upload-time = \"2025-09-29T23:19:25.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c\", size = 11348702, upload-time = \"2025-09-29T23:19:38.296Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53\", size = 11597846, upload-time = \"2025-09-29T23:19:48.856Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35\", size = 10729618, upload-time = \"2025-09-29T23:39:08.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908\", size = 11737212, upload-time = \"2025-09-29T23:19:59.765Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89\", size = 12362693, upload-time = \"2025-09-29T23:20:14.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98\", size = 12771002, upload-time = \"2025-09-29T23:20:26.76Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084\", size = 13450971, upload-time = \"2025-09-29T23:20:41.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b\", size = 10992722, upload-time = \"2025-09-29T23:20:54.139Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713\", size = 11544671, upload-time = \"2025-09-29T23:21:05.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8\", size = 10680807, upload-time = \"2025-09-29T23:21:15.979Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d\", size = 11709872, upload-time = \"2025-09-29T23:21:27.165Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac\", size = 12306371, upload-time = \"2025-09-29T23:21:40.532Z\" },\n { url = \"https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c\", size = 12765333, upload-time = \"2025-09-29T23:21:55.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493\", size = 13418120, upload-time = \"2025-09-29T23:22:10.109Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee\", size = 10993991, upload-time = \"2025-09-29T23:25:04.889Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5\", size = 12048227, upload-time = \"2025-09-29T23:22:24.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21\", size = 11411056, upload-time = \"2025-09-29T23:22:37.762Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78\", size = 11645189, upload-time = \"2025-09-29T23:22:51.688Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110\", size = 12121912, upload-time = \"2025-09-29T23:23:05.042Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86\", size = 12712160, upload-time = \"2025-09-29T23:23:28.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc\", size = 13199233, upload-time = \"2025-09-29T23:24:24.876Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0\", size = 11540635, upload-time = \"2025-09-29T23:25:52.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593\", size = 10759079, upload-time = \"2025-09-29T23:26:33.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c\", size = 11814049, upload-time = \"2025-09-29T23:27:15.384Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b\", size = 12332638, upload-time = \"2025-09-29T23:27:51.625Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6\", size = 12886834, upload-time = \"2025-09-29T23:28:21.289Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3\", size = 13409925, upload-time = \"2025-09-29T23:28:58.261Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5\", size = 11109071, upload-time = \"2025-09-29T23:32:27.484Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec\", size = 12048504, upload-time = \"2025-09-29T23:29:31.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7\", size = 11410702, upload-time = \"2025-09-29T23:29:54.591Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450\", size = 11634535, upload-time = \"2025-09-29T23:30:21.003Z\" },\n { url = \"https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5\", size = 12121582, upload-time = \"2025-09-29T23:30:43.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788\", size = 12699963, upload-time = \"2025-09-29T23:31:10.009Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87\", size = 13202175, upload-time = \"2025-09-29T23:31:59.173Z\" },\n]\n\n[[package]]\nname = \"pefile\"\nversion = \"2024.8.26\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz\", hash = \"sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632\", size = 76008, upload-time = \"2024-08-26T20:58:38.155Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl\", hash = \"sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f\", size = 74766, upload-time = \"2024-08-26T21:01:02.632Z\" },\n]\n\n[[package]]\nname = \"pluggy\"\nversion = \"1.6.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz\", hash = \"sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3\", size = 69412, upload-time = \"2025-05-15T12:30:07.975Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl\", hash = \"sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746\", size = 20538, upload-time = \"2025-05-15T12:30:06.134Z\" },\n]\n\n[[package]]\nname = \"py-cpuinfo\"\nversion = \"9.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz\", hash = \"sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690\", size = 104716, upload-time = \"2022-10-25T20:38:06.303Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl\", hash = \"sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5\", size = 22335, upload-time = \"2022-10-25T20:38:27.636Z\" },\n]\n\n[[package]]\nname = \"pyarrow\"\nversion = \"22.0.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/30/53/04a7fdc63e6056116c9ddc8b43bc28c12cdd181b85cbeadb79278475f3ae/pyarrow-22.0.0.tar.gz\", hash = \"sha256:3d600dc583260d845c7d8a6db540339dd883081925da2bd1c5cb808f720b3cd9\", size = 1151151, upload-time = \"2025-10-24T12:30:00.762Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d9/9b/cb3f7e0a345353def531ca879053e9ef6b9f38ed91aebcf68b09ba54dec0/pyarrow-22.0.0-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:77718810bd3066158db1e95a63c160ad7ce08c6b0710bc656055033e39cdad88\", size = 34223968, upload-time = \"2025-10-24T10:03:31.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/6c/41/3184b8192a120306270c5307f105b70320fdaa592c99843c5ef78aaefdcf/pyarrow-22.0.0-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:44d2d26cda26d18f7af7db71453b7b783788322d756e81730acb98f24eb90ace\", size = 35942085, upload-time = \"2025-10-24T10:03:38.146Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/3d/a1eab2f6f08001f9fb714b8ed5cfb045e2fe3e3e3c0c221f2c9ed1e6d67d/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:b9d71701ce97c95480fecb0039ec5bb889e75f110da72005743451339262f4ce\", size = 44964613, upload-time = \"2025-10-24T10:03:46.516Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/46/a1d9c24baf21cfd9ce994ac820a24608decf2710521b29223d4334985127/pyarrow-22.0.0-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:710624ab925dc2b05a6229d47f6f0dac1c1155e6ed559be7109f684eba048a48\", size = 47627059, upload-time = \"2025-10-24T10:03:55.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/3a/4c/f711acb13075c1391fd54bc17e078587672c575f8de2a6e62509af026dcf/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:f963ba8c3b0199f9d6b794c90ec77545e05eadc83973897a4523c9e8d84e9340\", size = 47947043, upload-time = \"2025-10-24T10:04:05.408Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/70/1f3180dd7c2eab35c2aca2b29ace6c519f827dcd4cfeb8e0dca41612cf7a/pyarrow-22.0.0-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:bd0d42297ace400d8febe55f13fdf46e86754842b860c978dfec16f081e5c653\", size = 50206505, upload-time = \"2025-10-24T10:04:15.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/07/fea6578112c8c60ffde55883a571e4c4c6bc7049f119d6b09333b5cc6f73/pyarrow-22.0.0-cp310-cp310-win_amd64.whl\", hash = \"sha256:00626d9dc0f5ef3a75fe63fd68b9c7c8302d2b5bbc7f74ecaedba83447a24f84\", size = 28101641, upload-time = \"2025-10-24T10:04:22.57Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/b7/18f611a8cdc43417f9394a3ccd3eace2f32183c08b9eddc3d17681819f37/pyarrow-22.0.0-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:3e294c5eadfb93d78b0763e859a0c16d4051fc1c5231ae8956d61cb0b5666f5a\", size = 34272022, upload-time = \"2025-10-24T10:04:28.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/5c/f259e2526c67eb4b9e511741b19870a02363a47a35edbebc55c3178db22d/pyarrow-22.0.0-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:69763ab2445f632d90b504a815a2a033f74332997052b721002298ed6de40f2e\", size = 35995834, upload-time = \"2025-10-24T10:04:35.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8d/281f0f9b9376d4b7f146913b26fac0aa2829cd1ee7e997f53a27411bbb92/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:b41f37cabfe2463232684de44bad753d6be08a7a072f6a83447eeaf0e4d2a215\", size = 45030348, upload-time = \"2025-10-24T10:04:43.366Z\" },\n { url = \"https://files.pythonhosted.org/packages/f5/e5/53c0a1c428f0976bf22f513d79c73000926cb00b9c138d8e02daf2102e18/pyarrow-22.0.0-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:35ad0f0378c9359b3f297299c3309778bb03b8612f987399a0333a560b43862d\", size = 47699480, upload-time = \"2025-10-24T10:04:51.486Z\" },\n { url = \"https://files.pythonhosted.org/packages/95/e1/9dbe4c465c3365959d183e6345d0a8d1dc5b02ca3f8db4760b3bc834cf25/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:8382ad21458075c2e66a82a29d650f963ce51c7708c7c0ff313a8c206c4fd5e8\", size = 48011148, upload-time = \"2025-10-24T10:04:59.585Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/b4/7caf5d21930061444c3cf4fa7535c82faf5263e22ce43af7c2759ceb5b8b/pyarrow-22.0.0-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:1a812a5b727bc09c3d7ea072c4eebf657c2f7066155506ba31ebf4792f88f016\", size = 50276964, upload-time = \"2025-10-24T10:05:08.175Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/f3/cec89bd99fa3abf826f14d4e53d3d11340ce6f6af4d14bdcd54cd83b6576/pyarrow-22.0.0-cp311-cp311-win_amd64.whl\", hash = \"sha256:ec5d40dd494882704fb876c16fa7261a69791e784ae34e6b5992e977bd2e238c\", size = 28106517, upload-time = \"2025-10-24T10:05:14.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/63/ba23862d69652f85b615ca14ad14f3bcfc5bf1b99ef3f0cd04ff93fdad5a/pyarrow-22.0.0-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:bea79263d55c24a32b0d79c00a1c58bb2ee5f0757ed95656b01c0fb310c5af3d\", size = 34211578, upload-time = \"2025-10-24T10:05:21.583Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/d0/f9ad86fe809efd2bcc8be32032fa72e8b0d112b01ae56a053006376c5930/pyarrow-22.0.0-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:12fe549c9b10ac98c91cf791d2945e878875d95508e1a5d14091a7aaa66d9cf8\", size = 35989906, upload-time = \"2025-10-24T10:05:29.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/b4/a8/f910afcb14630e64d673f15904ec27dd31f1e009b77033c365c84e8c1e1d/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:334f900ff08ce0423407af97e6c26ad5d4e3b0763645559ece6fbf3747d6a8f5\", size = 45021677, upload-time = \"2025-10-24T10:05:38.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/95/aec81f781c75cd10554dc17a25849c720d54feafb6f7847690478dcf5ef8/pyarrow-22.0.0-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:c6c791b09c57ed76a18b03f2631753a4960eefbbca80f846da8baefc6491fcfe\", size = 47726315, upload-time = \"2025-10-24T10:05:47.314Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/d4/74ac9f7a54cfde12ee42734ea25d5a3c9a45db78f9def949307a92720d37/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:c3200cb41cdbc65156e5f8c908d739b0dfed57e890329413da2748d1a2cd1a4e\", size = 47990906, upload-time = \"2025-10-24T10:05:58.254Z\" },\n { url = \"https://files.pythonhosted.org/packages/2e/71/fedf2499bf7a95062eafc989ace56572f3343432570e1c54e6599d5b88da/pyarrow-22.0.0-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:ac93252226cf288753d8b46280f4edf3433bf9508b6977f8dd8526b521a1bbb9\", size = 50306783, upload-time = \"2025-10-24T10:06:08.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/ed/b202abd5a5b78f519722f3d29063dda03c114711093c1995a33b8e2e0f4b/pyarrow-22.0.0-cp312-cp312-win_amd64.whl\", hash = \"sha256:44729980b6c50a5f2bfcc2668d36c569ce17f8b17bccaf470c4313dcbbf13c9d\", size = 27972883, upload-time = \"2025-10-24T10:06:14.204Z\" },\n { url = \"https://files.pythonhosted.org/packages/a6/d6/d0fac16a2963002fc22c8fa75180a838737203d558f0ed3b564c4a54eef5/pyarrow-22.0.0-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:e6e95176209257803a8b3d0394f21604e796dadb643d2f7ca21b66c9c0b30c9a\", size = 34204629, upload-time = \"2025-10-24T10:06:20.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/c6/9c/1d6357347fbae062ad3f17082f9ebc29cc733321e892c0d2085f42a2212b/pyarrow-22.0.0-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:001ea83a58024818826a9e3f89bf9310a114f7e26dfe404a4c32686f97bd7901\", size = 35985783, upload-time = \"2025-10-24T10:06:27.301Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/c0/782344c2ce58afbea010150df07e3a2f5fdad299cd631697ae7bd3bac6e3/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ce20fe000754f477c8a9125543f1936ea5b8867c5406757c224d745ed033e691\", size = 45020999, upload-time = \"2025-10-24T10:06:35.387Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/8b/5362443737a5307a7b67c1017c42cd104213189b4970bf607e05faf9c525/pyarrow-22.0.0-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:e0a15757fccb38c410947df156f9749ae4a3c89b2393741a50521f39a8cf202a\", size = 47724601, upload-time = \"2025-10-24T10:06:43.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/4d/76e567a4fc2e190ee6072967cb4672b7d9249ac59ae65af2d7e3047afa3b/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:cedb9dd9358e4ea1d9bce3665ce0797f6adf97ff142c8e25b46ba9cdd508e9b6\", size = 48001050, upload-time = \"2025-10-24T10:06:52.284Z\" },\n { url = \"https://files.pythonhosted.org/packages/01/5e/5653f0535d2a1aef8223cee9d92944cb6bccfee5cf1cd3f462d7cb022790/pyarrow-22.0.0-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:252be4a05f9d9185bb8c18e83764ebcfea7185076c07a7a662253af3a8c07941\", size = 50307877, upload-time = \"2025-10-24T10:07:02.405Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/f8/1d0bd75bf9328a3b826e24a16e5517cd7f9fbf8d34a3184a4566ef5a7f29/pyarrow-22.0.0-cp313-cp313-win_amd64.whl\", hash = \"sha256:a4893d31e5ef780b6edcaf63122df0f8d321088bb0dee4c8c06eccb1ca28d145\", size = 27977099, upload-time = \"2025-10-24T10:08:07.259Z\" },\n { url = \"https://files.pythonhosted.org/packages/90/81/db56870c997805bf2b0f6eeeb2d68458bf4654652dccdcf1bf7a42d80903/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:f7fe3dbe871294ba70d789be16b6e7e52b418311e166e0e3cba9522f0f437fb1\", size = 34336685, upload-time = \"2025-10-24T10:07:11.47Z\" },\n { url = \"https://files.pythonhosted.org/packages/1c/98/0727947f199aba8a120f47dfc229eeb05df15bcd7a6f1b669e9f882afc58/pyarrow-22.0.0-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:ba95112d15fd4f1105fb2402c4eab9068f0554435e9b7085924bcfaac2cc306f\", size = 36032158, upload-time = \"2025-10-24T10:07:18.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b4/9babdef9c01720a0785945c7cf550e4acd0ebcd7bdd2e6f0aa7981fa85e2/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:c064e28361c05d72eed8e744c9605cbd6d2bb7481a511c74071fd9b24bc65d7d\", size = 44892060, upload-time = \"2025-10-24T10:07:26.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/ca/2f8804edd6279f78a37062d813de3f16f29183874447ef6d1aadbb4efa0f/pyarrow-22.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:6f9762274496c244d951c819348afbcf212714902742225f649cf02823a6a10f\", size = 47504395, upload-time = \"2025-10-24T10:07:34.09Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/f0/77aa5198fd3943682b2e4faaf179a674f0edea0d55d326d83cb2277d9363/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:a9d9ffdc2ab696f6b15b4d1f7cec6658e1d788124418cb30030afbae31c64746\", size = 48066216, upload-time = \"2025-10-24T10:07:43.528Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/87/a1937b6e78b2aff18b706d738c9e46ade5bfcf11b294e39c87706a0089ac/pyarrow-22.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec1a15968a9d80da01e1d30349b2b0d7cc91e96588ee324ce1b5228175043e95\", size = 50288552, upload-time = \"2025-10-24T10:07:53.519Z\" },\n { url = \"https://files.pythonhosted.org/packages/60/ae/b5a5811e11f25788ccfdaa8f26b6791c9807119dffcf80514505527c384c/pyarrow-22.0.0-cp313-cp313t-win_amd64.whl\", hash = \"sha256:bba208d9c7decf9961998edf5c65e3ea4355d5818dd6cd0f6809bec1afb951cc\", size = 28262504, upload-time = \"2025-10-24T10:08:00.932Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/b0/0fa4d28a8edb42b0a7144edd20befd04173ac79819547216f8a9f36f9e50/pyarrow-22.0.0-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:9bddc2cade6561f6820d4cd73f99a0243532ad506bc510a75a5a65a522b2d74d\", size = 34224062, upload-time = \"2025-10-24T10:08:14.101Z\" },\n { url = \"https://files.pythonhosted.org/packages/0f/a8/7a719076b3c1be0acef56a07220c586f25cd24de0e3f3102b438d18ae5df/pyarrow-22.0.0-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e70ff90c64419709d38c8932ea9fe1cc98415c4f87ea8da81719e43f02534bc9\", size = 35990057, upload-time = \"2025-10-24T10:08:21.842Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/3c/359ed54c93b47fb6fe30ed16cdf50e3f0e8b9ccfb11b86218c3619ae50a8/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:92843c305330aa94a36e706c16209cd4df274693e777ca47112617db7d0ef3d7\", size = 45068002, upload-time = \"2025-10-24T10:08:29.034Z\" },\n { url = \"https://files.pythonhosted.org/packages/55/fc/4945896cc8638536ee787a3bd6ce7cec8ec9acf452d78ec39ab328efa0a1/pyarrow-22.0.0-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:6dda1ddac033d27421c20d7a7943eec60be44e0db4e079f33cc5af3b8280ccde\", size = 47737765, upload-time = \"2025-10-24T10:08:38.559Z\" },\n { url = \"https://files.pythonhosted.org/packages/cd/5e/7cb7edeb2abfaa1f79b5d5eb89432356155c8426f75d3753cbcb9592c0fd/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:84378110dd9a6c06323b41b56e129c504d157d1a983ce8f5443761eb5256bafc\", size = 48048139, upload-time = \"2025-10-24T10:08:46.784Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/c6/546baa7c48185f5e9d6e59277c4b19f30f48c94d9dd938c2a80d4d6b067c/pyarrow-22.0.0-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:854794239111d2b88b40b6ef92aa478024d1e5074f364033e73e21e3f76b25e0\", size = 50314244, upload-time = \"2025-10-24T10:08:55.771Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/79/755ff2d145aafec8d347bf18f95e4e81c00127f06d080135dfc86aea417c/pyarrow-22.0.0-cp314-cp314-win_amd64.whl\", hash = \"sha256:b883fe6fd85adad7932b3271c38ac289c65b7337c2c132e9569f9d3940620730\", size = 28757501, upload-time = \"2025-10-24T10:09:59.891Z\" },\n { url = \"https://files.pythonhosted.org/packages/0e/d2/237d75ac28ced3147912954e3c1a174df43a95f4f88e467809118a8165e0/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:7a820d8ae11facf32585507c11f04e3f38343c1e784c9b5a8b1da5c930547fe2\", size = 34355506, upload-time = \"2025-10-24T10:09:02.953Z\" },\n { url = \"https://files.pythonhosted.org/packages/1e/2c/733dfffe6d3069740f98e57ff81007809067d68626c5faef293434d11bd6/pyarrow-22.0.0-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:c6ec3675d98915bf1ec8b3c7986422682f7232ea76cad276f4c8abd5b7319b70\", size = 36047312, upload-time = \"2025-10-24T10:09:10.334Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/2b/29d6e3782dc1f299727462c1543af357a0f2c1d3c160ce199950d9ca51eb/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:3e739edd001b04f654b166204fc7a9de896cf6007eaff33409ee9e50ceaff754\", size = 45081609, upload-time = \"2025-10-24T10:09:18.61Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/42/aa9355ecc05997915af1b7b947a7f66c02dcaa927f3203b87871c114ba10/pyarrow-22.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:7388ac685cab5b279a41dfe0a6ccd99e4dbf322edfb63e02fc0443bf24134e91\", size = 47703663, upload-time = \"2025-10-24T10:09:27.369Z\" },\n { url = \"https://files.pythonhosted.org/packages/ee/62/45abedde480168e83a1de005b7b7043fd553321c1e8c5a9a114425f64842/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:f633074f36dbc33d5c05b5dc75371e5660f1dbf9c8b1d95669def05e5425989c\", size = 48066543, upload-time = \"2025-10-24T10:09:34.908Z\" },\n { url = \"https://files.pythonhosted.org/packages/84/e9/7878940a5b072e4f3bf998770acafeae13b267f9893af5f6d4ab3904b67e/pyarrow-22.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:4c19236ae2402a8663a2c8f21f1870a03cc57f0bef7e4b6eb3238cc82944de80\", size = 50288838, upload-time = \"2025-10-24T10:09:44.394Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/03/f335d6c52b4a4761bcc83499789a1e2e16d9d201a58c327a9b5cc9a41bd9/pyarrow-22.0.0-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0c34fe18094686194f204a3b1787a27456897d8a2d62caf84b61e8dfbc0252ae\", size = 29185594, upload-time = \"2025-10-24T10:09:53.111Z\" },\n]\n\n[[package]]\nname = \"pyfiglet\"\nversion = \"1.0.4\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c8/e3/0a86276ad2c383ce08d76110a8eec2fe22e7051c4b8ba3fa163a0b08c428/pyfiglet-1.0.4.tar.gz\", hash = \"sha256:db9c9940ed1bf3048deff534ed52ff2dafbbc2cd7610b17bb5eca1df6d4278ef\", size = 1560615, upload-time = \"2025-08-15T18:32:47.302Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9f/5c/fe9f95abd5eaedfa69f31e450f7e2768bef121dbdf25bcddee2cd3087a16/pyfiglet-1.0.4-py3-none-any.whl\", hash = \"sha256:65b57b7a8e1dff8a67dc8e940a117238661d5e14c3e49121032bd404d9b2b39f\", size = 1806118, upload-time = \"2025-08-15T18:32:45.556Z\" },\n]\n\n[[package]]\nname = \"pygments\"\nversion = \"2.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz\", hash = \"sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f\", size = 4955991, upload-time = \"2026-03-29T13:29:33.898Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl\", hash = \"sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176\", size = 1231151, upload-time = \"2026-03-29T13:29:30.038Z\" },\n]\n\n[[package]]\nname = \"pyinstaller\"\nversion = \"6.20.0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"altgraph\" },\n { name = \"macholib\", marker = \"sys_platform == 'darwin'\" },\n { name = \"packaging\" },\n { name = \"pefile\", marker = \"sys_platform == 'win32'\" },\n { name = \"pyinstaller-hooks-contrib\" },\n { name = \"pywin32-ctypes\", marker = \"sys_platform == 'win32'\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/46/60/d03d52e6690d4e9caf333dcd14550cde634ce6c118b3bc8fa3112c3186fd/pyinstaller-6.20.0.tar.gz\", hash = \"sha256:95c5c7e03d5d61e9dfb8ef259c699cf492bb1041beb6dbe83696608cec07347a\", size = 4048728, upload-time = \"2026-04-22T20:59:36.96Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d0/e4/e228d6d1bbb7fd62dc660a8fb202a583b023d3a3624ca95d1a9290ee4d6a/pyinstaller-6.20.0-py3-none-macosx_10_13_universal2.whl\", hash = \"sha256:bf3be4e1284ee78ddccba5e29f99443a12a7b4673168288ffc4c9d38c6f7b90e\", size = 1047642, upload-time = \"2026-04-22T20:58:32.006Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/bd/afb631bcb3f9040efebd4f6d067f0828b51710818f69fb41a2d4b7787f52/pyinstaller-6.20.0-py3-none-manylinux2014_aarch64.whl\", hash = \"sha256:72ae9c1fdea134afa791f58bdc9a1934d5c7609753c111e0026bfc272b32b712\", size = 742494, upload-time = \"2026-04-22T20:58:36.285Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/08/0729a5bac14754150e5d83b39d87d842eb42b0bffcaa03dbad6252e23a39/pyinstaller-6.20.0-py3-none-manylinux2014_i686.whl\", hash = \"sha256:1031bcc307f3fbeffd4e162723e64d46dbf591c82dd0997413afb2a07328b941\", size = 754191, upload-time = \"2026-04-22T20:58:40.603Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/82/bc0ee4c7b97db1958eb651e0da9fb1e672e5ae53ca8867fd97701de52906/pyinstaller-6.20.0-py3-none-manylinux2014_ppc64le.whl\", hash = \"sha256:8df3b3f347659fa2562d8d193a98ad4600133b8b8d07c268df89e4154376750e\", size = 751902, upload-time = \"2026-04-22T20:58:44.7Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e7/770002d6aaa54173881cb2c49bb195ba67b97bf39bac1cdf320f28401629/pyinstaller-6.20.0-py3-none-manylinux2014_s390x.whl\", hash = \"sha256:b0d3cc9dd8120d448459bd3880a12e2f9774c51443af49047801446377999a59\", size = 748634, upload-time = \"2026-04-22T20:58:48.579Z\" },\n { url = \"https://files.pythonhosted.org/packages/fe/db/68ba1fccb71278b2124fb90b37b7c8c0bc4c1173fba45b94466df3d9cb7f/pyinstaller-6.20.0-py3-none-manylinux2014_x86_64.whl\", hash = \"sha256:03696bb6350177c6bc23bcaf78e71a33c4a89b6754dd90d1be2f318e978c918b\", size = 748490, upload-time = \"2026-04-22T20:58:52.749Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/0f/ac77ffa996a56be3d5c8f85734a007f8347240691657f9704e7de2527fa3/pyinstaller-6.20.0-py3-none-musllinux_1_1_aarch64.whl\", hash = \"sha256:6357f1699f6af84f37e7367f031d4f68abdba65543b83990c9e8f5a4cebed0b7\", size = 747650, upload-time = \"2026-04-22T20:58:57.093Z\" },\n { url = \"https://files.pythonhosted.org/packages/e0/56/1ee91c3a2bc10ca1f36da10a6fd55ff7efc4dec367171eb25992a827874f/pyinstaller-6.20.0-py3-none-musllinux_1_1_x86_64.whl\", hash = \"sha256:0ab39c690abad26ba148e8f664f0478acc82a733997f4f22e757774832802da9\", size = 747413, upload-time = \"2026-04-22T20:59:01.174Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/55/ae264339996953c4cdf9d89d916a0a8fa26a83cf917a742fff8b9d5f3fe8/pyinstaller-6.20.0-py3-none-win32.whl\", hash = \"sha256:9a7637e8e44b4387b13667fdcaac86ab6b29c446c16d34d8401539b81838759c\", size = 1331584, upload-time = \"2026-04-22T20:59:07.201Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/8c/300f57578882cce259bfb5ae56fda3b69caa3fe9df40a176c719920ea6e2/pyinstaller-6.20.0-py3-none-win_amd64.whl\", hash = \"sha256:d588844e890ee80c4365867f98146636e1849bbca8e4284bbf0c809aff0f161a\", size = 1391851, upload-time = \"2026-04-22T20:59:14.024Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/ea/b2f8e1642aecda78c0b75c7321f708e49e10bb3c00dd4f148c40761a1527/pyinstaller-6.20.0-py3-none-win_arm64.whl\", hash = \"sha256:bd53282c0a73e5c95573e1ddc8e5d564d4932bec91efbaed4dc5fdff9c2ae7f2\", size = 1332259, upload-time = \"2026-04-22T20:59:20.509Z\" },\n]\n\n[[package]]\nname = \"pyinstaller-hooks-contrib\"\nversion = \"2026.5\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"packaging\" },\n { name = \"setuptools\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/1a/67/f4452d68793fb15beba4f19ef39a38a8822f0da7452b503c400d5a21f5c1/pyinstaller_hooks_contrib-2026.5.tar.gz\", hash = \"sha256:f066dfca8f7c45ff6336c9cf9fe25b4e48bfeb322a1aa24faaedfb8a8d1b0b08\", size = 173689, upload-time = \"2026-05-04T22:36:55.124Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f6/5c/fd465d11da4d12b50d7eb5d2ee2ceb780d8d049dbb489f3828d131e387af/pyinstaller_hooks_contrib-2026.5-py3-none-any.whl\", hash = \"sha256:ea1535783fbdac4626351709e83f3ea80b681d3a4745763ebb407b5e27342eb9\", size = 457314, upload-time = \"2026-05-04T22:36:53.598Z\" },\n]\n\n[[package]]\nname = \"pyogrio\"\nversion = \"0.12.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"certifi\" },\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n { name = \"packaging\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/49/d4/12f86b1ed09721363da4c09622464b604c851a9223fc0c6b393fb2012208/pyogrio-0.12.1.tar.gz\", hash = \"sha256:e548ab705bb3e5383693717de1e6c76da97f3762ab92522cb310f93128a75ff1\", size = 303289, upload-time = \"2025-11-28T19:04:53.341Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/26/04/e69f476c4cc279adc6d26194da4d3497f5d9efdd46777a6c0ad59c09233f/pyogrio-0.12.1-cp310-cp310-macosx_12_0_arm64.whl\", hash = \"sha256:5c4735235ca0d8dcdb4ecd69bd73e66762d161bce913b10d4458a18137cc7062\", size = 23672707, upload-time = \"2025-11-28T19:02:54.87Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/9e/805d640f050fc4a064ee5ba3289457f47d7f3464b57140caa8ddac039a67/pyogrio-0.12.1-cp310-cp310-macosx_12_0_x86_64.whl\", hash = \"sha256:3249d06c2520857b622f3ff0f1b7b4849291ee1fb72f21587825f5fd0f24b787\", size = 25247903, upload-time = \"2025-11-28T19:02:57.756Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c3/65577611485bc3e53a466ffbcd2407f89e8bd7e1c4554e8a0d23a4b8a636/pyogrio-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f4011b63f9d6c278ee6605971ffabe30b0e8f5992ec2c6df8c70ecfa68a5d02b\", size = 31279563, upload-time = \"2025-11-28T19:03:00.344Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/a6/5c03dffaf02542e8bae6c785d3e302bf4b890cd2ab281336b3c4dc867f84/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_aarch64.whl\", hash = \"sha256:940857c45051e1e19608ebfe8338bcdf7dd005389057431a3c7b5bff5beb0a5f\", size = 30831678, upload-time = \"2025-11-28T19:03:03.234Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/aa/0e484c13cf14bbe46c366ad363ab2406242a0fba85a7561d42bbd34c35dd/pyogrio-0.12.1-cp310-cp310-manylinux_2_28_x86_64.whl\", hash = \"sha256:0fd86bcd69126739325a543a489f312b5fd86db092d2dead682772ae4ee434f3\", size = 32380362, upload-time = \"2025-11-28T19:03:06.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/7c/cc515005780235d9ab14a29d33868bcaa1d5b423cee7995dda94735c41dd/pyogrio-0.12.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:dcf9cca273ead32beba7c002dd3db8a304105f52dd66200d48fa1ef30d0676af\", size = 22940628, upload-time = \"2025-11-28T19:03:08.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/46/b2c2dcdfd88759b56f103365905fffb85e8b08c1db1ec7c8f8b4c4c26016/pyogrio-0.12.1-cp311-cp311-macosx_12_0_arm64.whl\", hash = \"sha256:01b322dac2a258d24b024d1028dcaa03c9bb6d9c3988b86d298a64873d10dc65\", size = 23670744, upload-time = \"2025-11-28T19:03:11.299Z\" },\n { url = \"https://files.pythonhosted.org/packages/d9/21/b69f1bc51d805c00dd7c484a18e1fd2e75b41da1d9f5b8591d7d9d4a7d2f/pyogrio-0.12.1-cp311-cp311-macosx_12_0_x86_64.whl\", hash = \"sha256:e10087abcbd6b7e8212560a7002984e5078ac7b3a969ddc2c9929044dbb0d403\", size = 25246184, upload-time = \"2025-11-28T19:03:13.997Z\" },\n { url = \"https://files.pythonhosted.org/packages/19/8c/b6aae08e8fcc4f2a903da5f6bd8f888d2b6d7290e54dde5abe15b4cca8df/pyogrio-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1f6c621972b09fd81a32317e742c69ff4a7763a803da211361a78317f9577765\", size = 31434449, upload-time = \"2025-11-28T19:03:16.777Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/f9/9538fa893c29a3fdfeddf3b4c9f8db77f2d4134bc766587929fec8405ebf/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:c38253427b688464caad5316d4ebcec116b5e13f1f02cc4e3588502f136ca1b4\", size = 30987586, upload-time = \"2025-11-28T19:03:19.586Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a4/0aef5837b4e11840f501e48e01c31242838476c4f4aff9c05e228a083982/pyogrio-0.12.1-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:5f47787251de7ce13cc06038da93a1214dc283cbccf816be6e03c080358226c8\", size = 32534386, upload-time = \"2025-11-28T19:03:22.292Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/97/e8f2ed8a339152b86f8403c258ae5d5f23ab32d690eeb0545bb3473d0c69/pyogrio-0.12.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:c1d756cf2da4cdf5609779f260d1e1e89be023184225855d6f3dcd33bbe17cb0\", size = 22941718, upload-time = \"2025-11-28T19:03:24.82Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/e0/656b6536549d41b5aec57e0deca1f269b4f17532f0636836f587e581603a/pyogrio-0.12.1-cp312-cp312-macosx_12_0_arm64.whl\", hash = \"sha256:7a0d5ca39184030aec4cde30f4258f75b227a854530d2659babc8189d76e657d\", size = 23661857, upload-time = \"2025-11-28T19:03:27.744Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/78/313259e40da728bdb60106ffdc7ea8224d164498cb838ecb79b634aab967/pyogrio-0.12.1-cp312-cp312-macosx_12_0_x86_64.whl\", hash = \"sha256:feaff42bbe8087ca0b30e33b09d1ce049ca55fe83ad83db1139ef37d1d04f30c\", size = 25237106, upload-time = \"2025-11-28T19:03:30.018Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/ca/5368571a8b00b941ccfbe6ea29a5566aaffd45d4eb1553b956f7755af43e/pyogrio-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:81096a5139532de5a8003ef02b41d5d2444cb382a9aecd1165b447eb549180d3\", size = 31417048, upload-time = \"2025-11-28T19:03:32.572Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/85/6eeb875f27bf498d657eb5dab9f58e4c48b36c9037122787abee9a1ba4ba/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:41b78863f782f7a113ed0d36a5dc74d59735bd3a82af53510899bb02a18b06bb\", size = 30952115, upload-time = \"2025-11-28T19:03:35.332Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/cf8bec9024625947e1a71441906f60a5fa6f9e4c441c4428037e73b1fcc8/pyogrio-0.12.1-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:8b65be8c4258b27cc8f919b21929cecdadda4c353e3637fa30850339ef4d15c5\", size = 32537246, upload-time = \"2025-11-28T19:03:37.969Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/10/7c9f5e428273574e69f217eba3a6c0c42936188ad4dcd9e2c41ebb711188/pyogrio-0.12.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:1291b866c2c81d991bda15021b08b3621709b40ee3a85689229929e9465788bf\", size = 22933980, upload-time = \"2025-11-28T19:03:41.047Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/56/f56e79f71b84aa9bea25fdde39fab3846841bd7926be96f623eb7253b7e1/pyogrio-0.12.1-cp313-cp313-macosx_12_0_arm64.whl\", hash = \"sha256:ec0e47a5a704e575092b2fd5c83fa0472a1d421e590f94093eb837bb0a11125d\", size = 23658483, upload-time = \"2025-11-28T19:03:43.567Z\" },\n { url = \"https://files.pythonhosted.org/packages/66/ac/5559f8a35d58a16cbb2dd7602dd11936ff8796d8c9bf789f14da88764ec3/pyogrio-0.12.1-cp313-cp313-macosx_12_0_x86_64.whl\", hash = \"sha256:b4c888fc08f388be4dd99dfca5e84a5cdc5994deeec0230cc45144d3460e2b21\", size = 25232737, upload-time = \"2025-11-28T19:03:45.92Z\" },\n { url = \"https://files.pythonhosted.org/packages/59/58/925f1c129ddd7cbba8dea4e7609797cea7a76dbc863ac9afd318a679c4b9/pyogrio-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:73a88436f9962750d782853727897ac2722cac5900d920e39fab3e56d7a6a7f1\", size = 31377986, upload-time = \"2025-11-28T19:03:48.495Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/5f/c87034e92847b1844d0e8492a6a8e3301147d32c5e57909397ce64dbedf5/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:b5d248a0d59fe9bbf9a35690b70004c67830ee0ebe7d4f7bb8ffd8659f684b3a\", size = 30915791, upload-time = \"2025-11-28T19:03:51.267Z\" },\n { url = \"https://files.pythonhosted.org/packages/46/35/b874f79d03e9f900012cf609f7fff97b77164f2e14ee5aac282f8a999c1b/pyogrio-0.12.1-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:0622bc1a186421547660271083079b38d42e6f868802936d8538c0b379f1ab6b\", size = 32499754, upload-time = \"2025-11-28T19:03:58.776Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/c4/705678c9c4200130290b3a104b45c0cc10aaa48fcef3b2585b34e34ab3e1/pyogrio-0.12.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:207bd60c7ffbcea84584596e3637653aa7095e9ee20fa408f90c7f9460392613\", size = 22933945, upload-time = \"2025-11-28T19:04:01.551Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/e0/d92d4944001330bc87742d43f112d63d12fc89378b6187e62ff3fc1e8e85/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_arm64.whl\", hash = \"sha256:1511b39a283fa27cda906cd187a791578942a87a40b6a06697d9b43bb8ac80b0\", size = 23692697, upload-time = \"2025-11-28T19:04:04.208Z\" },\n { url = \"https://files.pythonhosted.org/packages/e5/d7/40acbe06d1b1140e3bb27b79e9163776469c1dc785f1be7d9a7fc7b95c87/pyogrio-0.12.1-cp313-cp313t-macosx_12_0_x86_64.whl\", hash = \"sha256:e486cd6aa9ea8a15394a5f84e019d61ec18f257eeeb642348bd68c3d1e57280b\", size = 25258083, upload-time = \"2025-11-28T19:04:07.121Z\" },\n { url = \"https://files.pythonhosted.org/packages/87/a1/39fefd9cddd95986700524f43d3093b4350f6e4fc200623c3838424a5080/pyogrio-0.12.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:d3f1a19f63bfd1d3042e45f37ad1d6598123a5a604b6c4ba3f38b419273486cd\", size = 31368995, upload-time = \"2025-11-28T19:04:09.88Z\" },\n { url = \"https://files.pythonhosted.org/packages/18/d7/da88c566e67d741a03851eb8d01358949d52e0b0fc2cd953582dc6d89ff8/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f3dcc59b3316b8a0f59346bcc638a4d69997864a4d21da839192f50c4c92369a\", size = 31035589, upload-time = \"2025-11-28T19:04:12.993Z\" },\n { url = \"https://files.pythonhosted.org/packages/11/ac/8f0199f0d31b8ddbc4b4ea1918df8070fdf3e0a63100b898633ec9396224/pyogrio-0.12.1-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:a0643e041dee3e8e038fce69f52a915ecb486e6d7b674c0f9919f3c9e9629689\", size = 32487973, upload-time = \"2025-11-28T19:04:16.103Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/64/8541a27e9635a335835d234dfaeb19d6c26097fd88224eda7791f83ca98d/pyogrio-0.12.1-cp313-cp313t-win_amd64.whl\", hash = \"sha256:5881017f29e110d3613819667657844d8e961b747f2d35cf92f273c27af6d068\", size = 22987374, upload-time = \"2025-11-28T19:04:18.91Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/6f/b4d5e285e08c0c60bcc23b50d73038ddc7335d8de79cc25678cd486a3db0/pyogrio-0.12.1-cp314-cp314-macosx_12_0_arm64.whl\", hash = \"sha256:5a1b0453d1c9e7b03715dd57296c8f3790acb8b50d7e3b5844b3074a18f50709\", size = 23660673, upload-time = \"2025-11-28T19:04:21.662Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/75/4b29e71489c5551aa1a1c5ca8c5160a60203c94f2f68c87c0e3614d58965/pyogrio-0.12.1-cp314-cp314-macosx_12_0_x86_64.whl\", hash = \"sha256:e7ee560422239dd09ca7f8284cc8483a8919c30d25f3049bb0249bff4c38dec4\", size = 25232194, upload-time = \"2025-11-28T19:04:23.975Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/6e/e9929d2261a07c36301983de2767bcde90d441ab5bf1d767ce56dd07f8b4/pyogrio-0.12.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:648c6f7f5f214d30e6cf493b4af1d59782907ac068af9119ca35f18153d6865a\", size = 31336936, upload-time = \"2025-11-28T19:04:26.594Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/9e/c59941d734ed936d4e5c89b4b99cb5541307cc42b3fd466ee78a1850c177/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:58042584f3fd4cabb0f55d26c1405053f656be8a5c266c38140316a1e981aca0\", size = 30902210, upload-time = \"2025-11-28T19:04:29.143Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/68/cc07320a63f9c2586e60bf11d148b00e12d0e707673bffe609bbdcb7e754/pyogrio-0.12.1-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:b438e38e4ccbaedaa5cb5824ff5de5539315d9b2fde6547c1e816576924ee8ca\", size = 32461674, upload-time = \"2025-11-28T19:04:31.792Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/bc/e4522f429c45a3b6ad28185849dd76e5c8718b780883c4795e7ee41841ae/pyogrio-0.12.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:f1d8d8a2fea3781dc2a05982c050259261ebc0f6c5e03732d6d79d582adf9363\", size = 23550575, upload-time = \"2025-11-28T19:04:34.556Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/ac/34f0664d0e391994a7b68529ae07a96432b2b4926dbac173ddc4ec94d310/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_arm64.whl\", hash = \"sha256:9fe7286946f35a73e6370dc5855bc7a5e8e7babf9e4a8bad7a3279a1d94c7ea9\", size = 23694285, upload-time = \"2025-11-28T19:04:37.833Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/93/873255529faff1da09d0b27287e85ec805a318c60c0c74fd7df77f94e557/pyogrio-0.12.1-cp314-cp314t-macosx_12_0_x86_64.whl\", hash = \"sha256:2c50345b382f1be801d654ec22c70ee974d6057d4ba7afe984b55f2192bc94ee\", size = 25259825, upload-time = \"2025-11-28T19:04:40.125Z\" },\n { url = \"https://files.pythonhosted.org/packages/27/95/4d4c3644695d99c6fa0b0b42f0d6266ae9dfaf64478a3371eaac950bdd02/pyogrio-0.12.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:f0db95765ac0ca935c7fe579e29451294e3ab19c317b0c59c31fbe92a69155e0\", size = 31371995, upload-time = \"2025-11-28T19:04:42.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/4c/6f/71f6bcca8754c8bf55a4b7153c61c91f8ac5ba992568e9fa3e54a0ee76fd/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:fc882779075982b93064b3bf3d8642514a6df00d9dd752493b104817072cfb01\", size = 31035498, upload-time = \"2025-11-28T19:04:45.79Z\" },\n { url = \"https://files.pythonhosted.org/packages/fd/47/75c1aa165a988347317afab9b938a01ad25dbca559b582ea34473703dc38/pyogrio-0.12.1-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:806f620e0c54b54dbdd65e9b6368d24f344cda84c9343364b40a57eb3e1c4dca\", size = 32496390, upload-time = \"2025-11-28T19:04:48.786Z\" },\n { url = \"https://files.pythonhosted.org/packages/31/93/4641dc5d952f6bdb71dabad2c50e3f8a5d58396cdea6ff8f8a08bfd4f4a6/pyogrio-0.12.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:5399f66730978d8852ef5f44dbafa0f738e7f28f4f784349f36830b69a9d2134\", size = 23620996, upload-time = \"2025-11-28T19:04:51.132Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version < '3.11'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz\", hash = \"sha256:60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47\", size = 226339, upload-time = \"2025-02-16T04:28:46.621Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/25/a3/c4cd4bba5b336075f145fe784fcaf4ef56ffbc979833303303e7a659dda2/pyproj-3.7.1-cp310-cp310-macosx_13_0_x86_64.whl\", hash = \"sha256:bf09dbeb333c34e9c546364e7df1ff40474f9fddf9e70657ecb0e4f670ff0b0e\", size = 6262524, upload-time = \"2025-02-16T04:27:19.725Z\" },\n { url = \"https://files.pythonhosted.org/packages/40/45/4fdf18f4cc1995f1992771d2a51cf186a9d7a8ec973c9693f8453850c707/pyproj-3.7.1-cp310-cp310-macosx_14_0_arm64.whl\", hash = \"sha256:6575b2e53cc9e3e461ad6f0692a5564b96e7782c28631c7771c668770915e169\", size = 4665102, upload-time = \"2025-02-16T04:27:24.428Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/d2/360eb127380106cee83569954ae696b88a891c804d7a93abe3fbc15f5976/pyproj-3.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:8cb516ee35ed57789b46b96080edf4e503fdb62dbb2e3c6581e0d6c83fca014b\", size = 9432667, upload-time = \"2025-02-16T04:27:27.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/76/a5/c6e11b9a99ce146741fb4d184d5c468446c6d6015b183cae82ac822a6cfa/pyproj-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:1e47c4e93b88d99dd118875ee3ca0171932444cdc0b52d493371b5d98d0f30ee\", size = 9259185, upload-time = \"2025-02-16T04:27:30.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/56/a3c15c42145797a99363fa0fdb4e9805dccb8b4a76a6d7b2cdf36ebcc2a1/pyproj-3.7.1-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:3e8d276caeae34fcbe4813855d0d97b9b825bab8d7a8b86d859c24a6213a5a0d\", size = 10469103, upload-time = \"2025-02-16T04:27:33.542Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/73/c9194c2802fefe2a4fd4230bdd5ab083e7604e93c64d0356fa49c363bad6/pyproj-3.7.1-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f173f851ee75e54acdaa053382b6825b400cb2085663a9bb073728a59c60aebb\", size = 10401391, upload-time = \"2025-02-16T04:27:36.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/c5/1d/ce8bb5b9251b04d7c22d63619bb3db3d2397f79000a9ae05b3fd86a5837e/pyproj-3.7.1-cp310-cp310-win32.whl\", hash = \"sha256:f550281ed6e5ea88fcf04a7c6154e246d5714be495c50c9e8e6b12d3fb63e158\", size = 5869997, upload-time = \"2025-02-16T04:27:38.302Z\" },\n { url = \"https://files.pythonhosted.org/packages/09/6a/ca145467fd2e5b21e3d5b8c2b9645dcfb3b68f08b62417699a1f5689008e/pyproj-3.7.1-cp310-cp310-win_amd64.whl\", hash = \"sha256:3537668992a709a2e7f068069192138618c00d0ba113572fdd5ee5ffde8222f3\", size = 6278581, upload-time = \"2025-02-16T04:27:41.051Z\" },\n { url = \"https://files.pythonhosted.org/packages/ab/0d/63670fc527e664068b70b7cab599aa38b7420dd009bdc29ea257e7f3dfb3/pyproj-3.7.1-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:a94e26c1a4950cea40116775588a2ca7cf56f1f434ff54ee35a84718f3841a3d\", size = 6264315, upload-time = \"2025-02-16T04:27:44.539Z\" },\n { url = \"https://files.pythonhosted.org/packages/25/9d/cbaf82cfb290d1f1fa42feb9ba9464013bb3891e40c4199f8072112e4589/pyproj-3.7.1-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:263b54ba5004b6b957d55757d846fc5081bc02980caa0279c4fc95fa0fff6067\", size = 4666267, upload-time = \"2025-02-16T04:27:47.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/53/24f9f9b8918c0550f3ff49ad5de4cf3f0688c9f91ff191476db8979146fe/pyproj-3.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:f6d6a2ccd5607cd15ef990c51e6f2dd27ec0a741e72069c387088bba3aab60fa\", size = 9680510, upload-time = \"2025-02-16T04:27:49.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/ac/12fab74a908d40b63174dc704587febd0729414804bbfd873cabe504ff2d/pyproj-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:8c5dcf24ede53d8abab7d8a77f69ff1936c6a8843ef4fcc574646e4be66e5739\", size = 9493619, upload-time = \"2025-02-16T04:27:52.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/c4/45/26311d6437135da2153a178125db5dfb6abce831ce04d10ec207eabac70a/pyproj-3.7.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:3c2e7449840a44ce860d8bea2c6c1c4bc63fa07cba801dcce581d14dcb031a02\", size = 10709755, upload-time = \"2025-02-16T04:27:55.239Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/52/4ecd0986f27d0e6c8ee3a7bc5c63da15acd30ac23034f871325b297e61fd/pyproj-3.7.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:0829865c1d3a3543f918b3919dc601eea572d6091c0dd175e1a054db9c109274\", size = 10642970, upload-time = \"2025-02-16T04:27:58.343Z\" },\n { url = \"https://files.pythonhosted.org/packages/3f/a5/d3bfc018fc92195a000d1d28acc1f3f1df15ff9f09ece68f45a2636c0134/pyproj-3.7.1-cp311-cp311-win32.whl\", hash = \"sha256:6181960b4b812e82e588407fe5c9c68ada267c3b084db078f248db5d7f45d18a\", size = 5868295, upload-time = \"2025-02-16T04:28:01.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/39/ef6f06a5b223dbea308cfcbb7a0f72e7b506aef1850e061b2c73b0818715/pyproj-3.7.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ad0ff443a785d84e2b380869fdd82e6bfc11eba6057d25b4409a9bbfa867970\", size = 6279871, upload-time = \"2025-02-16T04:28:04.988Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/c9/876d4345b8d17f37ac59ebd39f8fa52fc6a6a9891a420f72d050edb6b899/pyproj-3.7.1-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:2781029d90df7f8d431e29562a3f2d8eafdf233c4010d6fc0381858dc7373217\", size = 6264087, upload-time = \"2025-02-16T04:28:09.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/ff/e6/5f8691f8c90e7f402cc80a6276eb19d2ec1faa150d5ae2dd9c7b0a254da8/pyproj-3.7.1-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:d61bf8ab04c73c1da08eedaf21a103b72fa5b0a9b854762905f65ff8b375d394\", size = 4669628, upload-time = \"2025-02-16T04:28:10.944Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/ec/16475bbb79c1c68845c0a0d9c60c4fb31e61b8a2a20bc18b1a81e81c7f68/pyproj-3.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:04abc517a8555d1b05fcee768db3280143fe42ec39fdd926a2feef31631a1f2f\", size = 9721415, upload-time = \"2025-02-16T04:28:13.342Z\" },\n { url = \"https://files.pythonhosted.org/packages/b3/a3/448f05b15e318bd6bea9a32cfaf11e886c4ae61fa3eee6e09ed5c3b74bb2/pyproj-3.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:084c0a475688f934d386c2ab3b6ce03398a473cd48adfda70d9ab8f87f2394a0\", size = 9556447, upload-time = \"2025-02-16T04:28:15.818Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/ae/bd15fe8d8bd914ead6d60bca7f895a4e6f8ef7e3928295134ff9a7dad14c/pyproj-3.7.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:a20727a23b1e49c7dc7fe3c3df8e56a8a7acdade80ac2f5cca29d7ca5564c145\", size = 10758317, upload-time = \"2025-02-16T04:28:18.338Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/d9/5ccefb8bca925f44256b188a91c31238cae29ab6ee7f53661ecc04616146/pyproj-3.7.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:bf84d766646f1ebd706d883755df4370aaf02b48187cedaa7e4239f16bc8213d\", size = 10771259, upload-time = \"2025-02-16T04:28:20.822Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/7d/31dedff9c35fa703162f922eeb0baa6c44a3288469a5fd88d209e2892f9e/pyproj-3.7.1-cp312-cp312-win32.whl\", hash = \"sha256:5f0da2711364d7cb9f115b52289d4a9b61e8bca0da57f44a3a9d6fc9bdeb7274\", size = 5859914, upload-time = \"2025-02-16T04:28:23.303Z\" },\n { url = \"https://files.pythonhosted.org/packages/3e/47/c6ab03d6564a7c937590cff81a2742b5990f096cce7c1a622d325be340ee/pyproj-3.7.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:aee664a9d806612af30a19dba49e55a7a78ebfec3e9d198f6a6176e1d140ec98\", size = 6273196, upload-time = \"2025-02-16T04:28:25.227Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/01/984828464c9960036c602753fc0f21f24f0aa9043c18fa3f2f2b66a86340/pyproj-3.7.1-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:5f8d02ef4431dee414d1753d13fa82a21a2f61494737b5f642ea668d76164d6d\", size = 6253062, upload-time = \"2025-02-16T04:28:27.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/65/6ecdcdc829811a2c160cdfe2f068a009fc572fd4349664f758ccb0853a7c/pyproj-3.7.1-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:0b853ae99bda66cbe24b4ccfe26d70601d84375940a47f553413d9df570065e0\", size = 4660548, upload-time = \"2025-02-16T04:28:29.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/da/dda94c4490803679230ba4c17a12f151b307a0d58e8110820405ca2d98db/pyproj-3.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\", hash = \"sha256:83db380c52087f9e9bdd8a527943b2e7324f275881125e39475c4f9277bdeec4\", size = 9662464, upload-time = \"2025-02-16T04:28:31.437Z\" },\n { url = \"https://files.pythonhosted.org/packages/6f/57/f61b7d22c91ae1d12ee00ac4c0038714e774ebcd851b9133e5f4f930dd40/pyproj-3.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\", hash = \"sha256:b35ed213892e211a3ce2bea002aa1183e1a2a9b79e51bb3c6b15549a831ae528\", size = 9497461, upload-time = \"2025-02-16T04:28:33.848Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/f6/932128236f79d2ac7d39fe1a19667fdf7155d9a81d31fb9472a7a497790f/pyproj-3.7.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a8b15b0463d1303bab113d1a6af2860a0d79013c3a66fcc5475ce26ef717fd4f\", size = 10708869, upload-time = \"2025-02-16T04:28:37.34Z\" },\n { url = \"https://files.pythonhosted.org/packages/1d/0d/07ac7712994454a254c383c0d08aff9916a2851e6512d59da8dc369b1b02/pyproj-3.7.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:87229e42b75e89f4dad6459200f92988c5998dfb093c7c631fb48524c86cd5dc\", size = 10729260, upload-time = \"2025-02-16T04:28:40.639Z\" },\n { url = \"https://files.pythonhosted.org/packages/b0/d0/9c604bc72c37ba69b867b6df724d6a5af6789e8c375022c952f65b2af558/pyproj-3.7.1-cp313-cp313-win32.whl\", hash = \"sha256:d666c3a3faaf3b1d7fc4a544059c4eab9d06f84a604b070b7aa2f318e227798e\", size = 5855462, upload-time = \"2025-02-16T04:28:42.827Z\" },\n { url = \"https://files.pythonhosted.org/packages/98/df/68a2b7f5fb6400c64aad82d72bcc4bc531775e62eedff993a77c780defd0/pyproj-3.7.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:d3caac7473be22b6d6e102dde6c46de73b96bc98334e577dfaee9886f102ea2e\", size = 6266573, upload-time = \"2025-02-16T04:28:44.727Z\" },\n]\n\n[[package]]\nname = \"pyproj\"\nversion = \"3.7.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nresolution-markers = [\n \"python_full_version >= '3.12'\",\n \"python_full_version == '3.11.*'\",\n]\ndependencies = [\n { name = \"certifi\", marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/04/90/67bd7260b4ea9b8b20b4f58afef6c223ecb3abf368eb4ec5bc2cdef81b49/pyproj-3.7.2.tar.gz\", hash = \"sha256:39a0cf1ecc7e282d1d30f36594ebd55c9fae1fda8a2622cee5d100430628f88c\", size = 226279, upload-time = \"2025-08-14T12:05:42.18Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/a6/bd/f205552cd1713b08f93b09e39a3ec99edef0b3ebbbca67b486fdf1abe2de/pyproj-3.7.2-cp311-cp311-macosx_13_0_x86_64.whl\", hash = \"sha256:2514d61f24c4e0bb9913e2c51487ecdaeca5f8748d8313c933693416ca41d4d5\", size = 6227022, upload-time = \"2025-08-14T12:03:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/75/4c/9a937e659b8b418ab573c6d340d27e68716928953273e0837e7922fcac34/pyproj-3.7.2-cp311-cp311-macosx_14_0_arm64.whl\", hash = \"sha256:8693ca3892d82e70de077701ee76dd13d7bca4ae1c9d1e739d72004df015923a\", size = 4625810, upload-time = \"2025-08-14T12:03:53.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/c0/7d/a9f41e814dc4d1dc54e95b2ccaf0b3ebe3eb18b1740df05fe334724c3d89/pyproj-3.7.2-cp311-cp311-manylinux_2_28_aarch64.whl\", hash = \"sha256:5e26484d80fea56273ed1555abaea161e9661d81a6c07815d54b8e883d4ceb25\", size = 9638694, upload-time = \"2025-08-14T12:03:55.669Z\" },\n { url = \"https://files.pythonhosted.org/packages/ad/ab/9bdb4a6216b712a1f9aab1c0fcbee5d3726f34a366f29c3e8c08a78d6b70/pyproj-3.7.2-cp311-cp311-manylinux_2_28_x86_64.whl\", hash = \"sha256:281cb92847814e8018010c48b4069ff858a30236638631c1a91dd7bfa68f8a8a\", size = 9493977, upload-time = \"2025-08-14T12:03:57.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/c9/db/2db75b1b6190f1137b1c4e8ef6a22e1c338e46320f6329bfac819143e063/pyproj-3.7.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:9c8577f0b7bb09118ec2e57e3babdc977127dd66326d6c5d755c76b063e6d9dc\", size = 10841151, upload-time = \"2025-08-14T12:04:00.271Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/f7/989643394ba23a286e9b7b3f09981496172f9e0d4512457ffea7dc47ffc7/pyproj-3.7.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:a23f59904fac3a5e7364b3aa44d288234af267ca041adb2c2b14a903cd5d3ac5\", size = 10751585, upload-time = \"2025-08-14T12:04:02.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/6d/ad928fe975a6c14a093c92e6a319ca18f479f3336bb353a740bdba335681/pyproj-3.7.2-cp311-cp311-win32.whl\", hash = \"sha256:f2af4ed34b2cf3e031a2d85b067a3ecbd38df073c567e04b52fa7a0202afde8a\", size = 5908533, upload-time = \"2025-08-14T12:04:04.821Z\" },\n { url = \"https://files.pythonhosted.org/packages/79/e0/b95584605cec9ed50b7ebaf7975d1c4ddeec5a86b7a20554ed8b60042bd7/pyproj-3.7.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:0b7cb633565129677b2a183c4d807c727d1c736fcb0568a12299383056e67433\", size = 6320742, upload-time = \"2025-08-14T12:04:06.357Z\" },\n { url = \"https://files.pythonhosted.org/packages/b7/4d/536e8f93bca808175c2d0a5ac9fdf69b960d8ab6b14f25030dccb07464d7/pyproj-3.7.2-cp311-cp311-win_arm64.whl\", hash = \"sha256:38b08d85e3a38e455625b80e9eb9f78027c8e2649a21dec4df1f9c3525460c71\", size = 6245772, upload-time = \"2025-08-14T12:04:08.365Z\" },\n { url = \"https://files.pythonhosted.org/packages/8d/ab/9893ea9fb066be70ed9074ae543914a618c131ed8dff2da1e08b3a4df4db/pyproj-3.7.2-cp312-cp312-macosx_13_0_x86_64.whl\", hash = \"sha256:0a9bb26a6356fb5b033433a6d1b4542158fb71e3c51de49b4c318a1dff3aeaab\", size = 6219832, upload-time = \"2025-08-14T12:04:10.264Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/78/4c64199146eed7184eb0e85bedec60a4aa8853b6ffe1ab1f3a8b962e70a0/pyproj-3.7.2-cp312-cp312-macosx_14_0_arm64.whl\", hash = \"sha256:567caa03021178861fad27fabde87500ec6d2ee173dd32f3e2d9871e40eebd68\", size = 4620650, upload-time = \"2025-08-14T12:04:11.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b6/ac/14a78d17943898a93ef4f8c6a9d4169911c994e3161e54a7cedeba9d8dde/pyproj-3.7.2-cp312-cp312-manylinux_2_28_aarch64.whl\", hash = \"sha256:c203101d1dc3c038a56cff0447acc515dd29d6e14811406ac539c21eed422b2a\", size = 9667087, upload-time = \"2025-08-14T12:04:13.964Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/be/212882c450bba74fc8d7d35cbd57e4af84792f0a56194819d98106b075af/pyproj-3.7.2-cp312-cp312-manylinux_2_28_x86_64.whl\", hash = \"sha256:1edc34266c0c23ced85f95a1ee8b47c9035eae6aca5b6b340327250e8e281630\", size = 9552797, upload-time = \"2025-08-14T12:04:16.624Z\" },\n { url = \"https://files.pythonhosted.org/packages/ba/c0/c0f25c87b5d2a8686341c53c1792a222a480d6c9caf60311fec12c99ec26/pyproj-3.7.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:aa9f26c21bc0e2dc3d224cb1eb4020cf23e76af179a7c66fea49b828611e4260\", size = 10837036, upload-time = \"2025-08-14T12:04:18.733Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/37/5cbd6772addde2090c91113332623a86e8c7d583eccb2ad02ea634c4a89f/pyproj-3.7.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:f9428b318530625cb389b9ddc9c51251e172808a4af79b82809376daaeabe5e9\", size = 10775952, upload-time = \"2025-08-14T12:04:20.709Z\" },\n { url = \"https://files.pythonhosted.org/packages/69/a1/dc250e3cf83eb4b3b9a2cf86fdb5e25288bd40037ae449695550f9e96b2f/pyproj-3.7.2-cp312-cp312-win32.whl\", hash = \"sha256:b3d99ed57d319da042f175f4554fc7038aa4bcecc4ac89e217e350346b742c9d\", size = 5898872, upload-time = \"2025-08-14T12:04:22.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/4a/a6/6fe724b72b70f2b00152d77282e14964d60ab092ec225e67c196c9b463e5/pyproj-3.7.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:11614a054cd86a2ed968a657d00987a86eeb91fdcbd9ad3310478685dc14a128\", size = 6312176, upload-time = \"2025-08-14T12:04:24.736Z\" },\n { url = \"https://files.pythonhosted.org/packages/5d/68/915cc32c02a91e76d02c8f55d5a138d6ef9e47a0d96d259df98f4842e558/pyproj-3.7.2-cp312-cp312-win_arm64.whl\", hash = \"sha256:509a146d1398bafe4f53273398c3bb0b4732535065fa995270e52a9d3676bca3\", size = 6233452, upload-time = \"2025-08-14T12:04:27.287Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/14/faf1b90d267cea68d7e70662e7f88cefdb1bc890bd596c74b959e0517a72/pyproj-3.7.2-cp313-cp313-macosx_13_0_x86_64.whl\", hash = \"sha256:19466e529b1b15eeefdf8ff26b06fa745856c044f2f77bf0edbae94078c1dfa1\", size = 6214580, upload-time = \"2025-08-14T12:04:28.804Z\" },\n { url = \"https://files.pythonhosted.org/packages/35/48/da9a45b184d375f62667f62eba0ca68569b0bd980a0bb7ffcc1d50440520/pyproj-3.7.2-cp313-cp313-macosx_14_0_arm64.whl\", hash = \"sha256:c79b9b84c4a626c5dc324c0d666be0bfcebd99f7538d66e8898c2444221b3da7\", size = 4615388, upload-time = \"2025-08-14T12:04:30.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/5e/e7/d2b459a4a64bca328b712c1b544e109df88e5c800f7c143cfbc404d39bfb/pyproj-3.7.2-cp313-cp313-manylinux_2_28_aarch64.whl\", hash = \"sha256:ceecf374cacca317bc09e165db38ac548ee3cad07c3609442bd70311c59c21aa\", size = 9628455, upload-time = \"2025-08-14T12:04:32.435Z\" },\n { url = \"https://files.pythonhosted.org/packages/f8/85/c2b1706e51942de19076eff082f8495e57d5151364e78b5bef4af4a1d94a/pyproj-3.7.2-cp313-cp313-manylinux_2_28_x86_64.whl\", hash = \"sha256:5141a538ffdbe4bfd157421828bb2e07123a90a7a2d6f30fa1462abcfb5ce681\", size = 9514269, upload-time = \"2025-08-14T12:04:34.599Z\" },\n { url = \"https://files.pythonhosted.org/packages/34/38/07a9b89ae7467872f9a476883a5bad9e4f4d1219d31060f0f2b282276cbe/pyproj-3.7.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f000841e98ea99acbb7b8ca168d67773b0191de95187228a16110245c5d954d5\", size = 10808437, upload-time = \"2025-08-14T12:04:36.485Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/56/fda1daeabbd39dec5b07f67233d09f31facb762587b498e6fc4572be9837/pyproj-3.7.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:8115faf2597f281a42ab608ceac346b4eb1383d3b45ab474fd37341c4bf82a67\", size = 10745540, upload-time = \"2025-08-14T12:04:38.568Z\" },\n { url = \"https://files.pythonhosted.org/packages/0d/90/c793182cbba65a39a11db2ac6b479fe76c59e6509ae75e5744c344a0da9d/pyproj-3.7.2-cp313-cp313-win32.whl\", hash = \"sha256:f18c0579dd6be00b970cb1a6719197fceecc407515bab37da0066f0184aafdf3\", size = 5896506, upload-time = \"2025-08-14T12:04:41.059Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/0f/747974129cf0d800906f81cd25efd098c96509026e454d4b66868779ab04/pyproj-3.7.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:bb41c29d5f60854b1075853fe80c58950b398d4ebb404eb532536ac8d2834ed7\", size = 6310195, upload-time = \"2025-08-14T12:04:42.974Z\" },\n { url = \"https://files.pythonhosted.org/packages/82/64/fc7598a53172c4931ec6edf5228280663063150625d3f6423b4c20f9daff/pyproj-3.7.2-cp313-cp313-win_arm64.whl\", hash = \"sha256:2b617d573be4118c11cd96b8891a0b7f65778fa7733ed8ecdb297a447d439100\", size = 6230748, upload-time = \"2025-08-14T12:04:44.491Z\" },\n { url = \"https://files.pythonhosted.org/packages/aa/f0/611dd5cddb0d277f94b7af12981f56e1441bf8d22695065d4f0df5218498/pyproj-3.7.2-cp313-cp313t-macosx_13_0_x86_64.whl\", hash = \"sha256:d27b48f0e81beeaa2b4d60c516c3a1cfbb0c7ff6ef71256d8e9c07792f735279\", size = 6241729, upload-time = \"2025-08-14T12:04:46.274Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/93/40bd4a6c523ff9965e480870611aed7eda5aa2c6128c6537345a2b77b542/pyproj-3.7.2-cp313-cp313t-macosx_14_0_arm64.whl\", hash = \"sha256:55a3610d75023c7b1c6e583e48ef8f62918e85a2ae81300569d9f104d6684bb6\", size = 4652497, upload-time = \"2025-08-14T12:04:48.203Z\" },\n { url = \"https://files.pythonhosted.org/packages/1b/ae/7150ead53c117880b35e0d37960d3138fe640a235feb9605cb9386f50bb0/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_aarch64.whl\", hash = \"sha256:8d7349182fa622696787cc9e195508d2a41a64765da9b8a6bee846702b9e6220\", size = 9942610, upload-time = \"2025-08-14T12:04:49.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/17/7a4a7eafecf2b46ab64e5c08176c20ceb5844b503eaa551bf12ccac77322/pyproj-3.7.2-cp313-cp313t-manylinux_2_28_x86_64.whl\", hash = \"sha256:d230b186eb876ed4f29a7c5ee310144c3a0e44e89e55f65fb3607e13f6db337c\", size = 9692390, upload-time = \"2025-08-14T12:04:51.731Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/55/ae18f040f6410f0ea547a21ada7ef3e26e6c82befa125b303b02759c0e9d/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:237499c7862c578d0369e2b8ac56eec550e391a025ff70e2af8417139dabb41c\", size = 11047596, upload-time = \"2025-08-14T12:04:53.748Z\" },\n { url = \"https://files.pythonhosted.org/packages/e6/2e/d3fff4d2909473f26ae799f9dda04caa322c417a51ff3b25763f7d03b233/pyproj-3.7.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:8c225f5978abd506fd9a78eaaf794435e823c9156091cabaab5374efb29d7f69\", size = 10896975, upload-time = \"2025-08-14T12:04:55.875Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/bc/8fc7d3963d87057b7b51ebe68c1e7c51c23129eee5072ba6b86558544a46/pyproj-3.7.2-cp313-cp313t-win32.whl\", hash = \"sha256:2da731876d27639ff9d2d81c151f6ab90a1546455fabd93368e753047be344a2\", size = 5953057, upload-time = \"2025-08-14T12:04:58.466Z\" },\n { url = \"https://files.pythonhosted.org/packages/cc/27/ea9809966cc47d2d51e6d5ae631ea895f7c7c7b9b3c29718f900a8f7d197/pyproj-3.7.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:f54d91ae18dd23b6c0ab48126d446820e725419da10617d86a1b69ada6d881d3\", size = 6375414, upload-time = \"2025-08-14T12:04:59.861Z\" },\n { url = \"https://files.pythonhosted.org/packages/5b/f8/1ef0129fba9a555c658e22af68989f35e7ba7b9136f25758809efec0cd6e/pyproj-3.7.2-cp313-cp313t-win_arm64.whl\", hash = \"sha256:fc52ba896cfc3214dc9f9ca3c0677a623e8fdd096b257c14a31e719d21ff3fdd\", size = 6262501, upload-time = \"2025-08-14T12:05:01.39Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/17/c2b050d3f5b71b6edd0d96ae16c990fdc42a5f1366464a5c2772146de33a/pyproj-3.7.2-cp314-cp314-macosx_13_0_x86_64.whl\", hash = \"sha256:2aaa328605ace41db050d06bac1adc11f01b71fe95c18661497763116c3a0f02\", size = 6214541, upload-time = \"2025-08-14T12:05:03.166Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/68/68ada9c8aea96ded09a66cfd9bf87aa6db8c2edebe93f5bf9b66b0143fbc/pyproj-3.7.2-cp314-cp314-macosx_14_0_arm64.whl\", hash = \"sha256:35dccbce8201313c596a970fde90e33605248b66272595c061b511c8100ccc08\", size = 4617456, upload-time = \"2025-08-14T12:05:04.563Z\" },\n { url = \"https://files.pythonhosted.org/packages/81/e4/4c50ceca7d0e937977866b02cb64e6ccf4df979a5871e521f9e255df6073/pyproj-3.7.2-cp314-cp314-manylinux_2_28_aarch64.whl\", hash = \"sha256:25b0b7cb0042444c29a164b993c45c1b8013d6c48baa61dc1160d834a277e83b\", size = 9615590, upload-time = \"2025-08-14T12:05:06.094Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/1e/ada6fb15a1d75b5bd9b554355a69a798c55a7dcc93b8d41596265c1772e3/pyproj-3.7.2-cp314-cp314-manylinux_2_28_x86_64.whl\", hash = \"sha256:85def3a6388e9ba51f964619aa002a9d2098e77c6454ff47773bb68871024281\", size = 9474960, upload-time = \"2025-08-14T12:05:07.973Z\" },\n { url = \"https://files.pythonhosted.org/packages/51/07/9d48ad0a8db36e16f842f2c8a694c1d9d7dcf9137264846bef77585a71f3/pyproj-3.7.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:b1bccefec3875ab81eabf49059e2b2ea77362c178b66fd3528c3e4df242f1516\", size = 10799478, upload-time = \"2025-08-14T12:05:14.102Z\" },\n { url = \"https://files.pythonhosted.org/packages/85/cf/2f812b529079f72f51ff2d6456b7fef06c01735e5cfd62d54ffb2b548028/pyproj-3.7.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:d5371ca114d6990b675247355a801925814eca53e6c4b2f1b5c0a956336ee36e\", size = 10710030, upload-time = \"2025-08-14T12:05:16.317Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/9b/4626a19e1f03eba4c0e77b91a6cf0f73aa9cb5d51a22ee385c22812bcc2c/pyproj-3.7.2-cp314-cp314-win32.whl\", hash = \"sha256:77f066626030f41be543274f5ac79f2a511fe89860ecd0914f22131b40a0ec25\", size = 5991181, upload-time = \"2025-08-14T12:05:19.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/04/b2/5a6610554306a83a563080c2cf2c57565563eadd280e15388efa00fb5b33/pyproj-3.7.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:5a964da1696b8522806f4276ab04ccfff8f9eb95133a92a25900697609d40112\", size = 6434721, upload-time = \"2025-08-14T12:05:21.022Z\" },\n { url = \"https://files.pythonhosted.org/packages/ae/ce/6c910ea2e1c74ef673c5d48c482564b8a7824a44c4e35cca2e765b68cfcc/pyproj-3.7.2-cp314-cp314-win_arm64.whl\", hash = \"sha256:e258ab4dbd3cf627809067c0ba8f9884ea76c8e5999d039fb37a1619c6c3e1f6\", size = 6363821, upload-time = \"2025-08-14T12:05:22.627Z\" },\n { url = \"https://files.pythonhosted.org/packages/e4/e4/5532f6f7491812ba782a2177fe9de73fd8e2912b59f46a1d056b84b9b8f2/pyproj-3.7.2-cp314-cp314t-macosx_13_0_x86_64.whl\", hash = \"sha256:bbbac2f930c6d266f70ec75df35ef851d96fdb3701c674f42fd23a9314573b37\", size = 6241773, upload-time = \"2025-08-14T12:05:24.577Z\" },\n { url = \"https://files.pythonhosted.org/packages/20/1f/0938c3f2bbbef1789132d1726d9b0e662f10cfc22522743937f421ad664e/pyproj-3.7.2-cp314-cp314t-macosx_14_0_arm64.whl\", hash = \"sha256:b7544e0a3d6339dc9151e9c8f3ea62a936ab7cc446a806ec448bbe86aebb979b\", size = 4652537, upload-time = \"2025-08-14T12:05:26.391Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/a8/488b1ed47d25972f33874f91f09ca8f2227902f05f63a2b80dc73e7b1c97/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_aarch64.whl\", hash = \"sha256:f7f5133dca4c703e8acadf6f30bc567d39a42c6af321e7f81975c2518f3ed357\", size = 9940864, upload-time = \"2025-08-14T12:05:27.985Z\" },\n { url = \"https://files.pythonhosted.org/packages/c7/cc/7f4c895d0cb98e47b6a85a6d79eaca03eb266129eed2f845125c09cf31ff/pyproj-3.7.2-cp314-cp314t-manylinux_2_28_x86_64.whl\", hash = \"sha256:5aff3343038d7426aa5076f07feb88065f50e0502d1b0d7c22ddfdd2c75a3f81\", size = 9688868, upload-time = \"2025-08-14T12:05:30.425Z\" },\n { url = \"https://files.pythonhosted.org/packages/b2/b7/c7e306b8bb0f071d9825b753ee4920f066c40fbfcce9372c4f3cfb2fc4ed/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:b0552178c61f2ac1c820d087e8ba6e62b29442debddbb09d51c4bf8acc84d888\", size = 11045910, upload-time = \"2025-08-14T12:05:32.507Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/fb/538a4d2df695980e2dde5c04d965fbdd1fe8c20a3194dc4aaa3952a4d1be/pyproj-3.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:47d87db2d2c436c5fd0409b34d70bb6cdb875cca2ebe7a9d1c442367b0ab8d59\", size = 10895724, upload-time = \"2025-08-14T12:05:35.465Z\" },\n { url = \"https://files.pythonhosted.org/packages/e8/8b/a3f0618b03957de9db5489a04558a8826f43906628bb0b766033aa3b5548/pyproj-3.7.2-cp314-cp314t-win32.whl\", hash = \"sha256:c9b6f1d8ad3e80a0ee0903a778b6ece7dca1d1d40f6d114ae01bc8ddbad971aa\", size = 6056848, upload-time = \"2025-08-14T12:05:37.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/bc/56/413240dd5149dd3291eda55aa55a659da4431244a2fd1319d0ae89407cfb/pyproj-3.7.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:1914e29e27933ba6f9822663ee0600f169014a2859f851c054c88cf5ea8a333c\", size = 6517676, upload-time = \"2025-08-14T12:05:39.126Z\" },\n { url = \"https://files.pythonhosted.org/packages/15/73/a7141a1a0559bf1a7aa42a11c879ceb19f02f5c6c371c6d57fd86cefd4d1/pyproj-3.7.2-cp314-cp314t-win_arm64.whl\", hash = \"sha256:d9d25bae416a24397e0d85739f84d323b55f6511e45a522dd7d7eae70d10c7e4\", size = 6391844, upload-time = \"2025-08-14T12:05:40.745Z\" },\n]\n\n[[package]]\nname = \"pytest\"\nversion = \"9.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n { name = \"exceptiongroup\", marker = \"python_full_version < '3.11'\" },\n { name = \"iniconfig\" },\n { name = \"packaging\" },\n { name = \"pluggy\" },\n { name = \"pygments\" },\n { name = \"tomli\", marker = \"python_full_version < '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz\", hash = \"sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c\", size = 1572165, upload-time = \"2026-04-07T17:16:18.027Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl\", hash = \"sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9\", size = 375249, upload-time = \"2026-04-07T17:16:16.13Z\" },\n]\n\n[[package]]\nname = \"pytest-benchmark\"\nversion = \"5.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"py-cpuinfo\" },\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/24/34/9f732b76456d64faffbef6232f1f9dbec7a7c4999ff46282fa418bd1af66/pytest_benchmark-5.2.3.tar.gz\", hash = \"sha256:deb7317998a23c650fd4ff76e1230066a76cb45dcece0aca5607143c619e7779\", size = 341340, upload-time = \"2025-11-09T18:48:43.215Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/33/29/e756e715a48959f1c0045342088d7ca9762a2f509b945f362a316e9412b7/pytest_benchmark-5.2.3-py3-none-any.whl\", hash = \"sha256:bc839726ad20e99aaa0d11a127445457b4219bdb9e80a1afc4b51da7f96b0803\", size = 45255, upload-time = \"2025-11-09T18:48:39.765Z\" },\n]\n\n[[package]]\nname = \"pytest-mock\"\nversion = \"3.15.1\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"pytest\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz\", hash = \"sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f\", size = 34036, upload-time = \"2025-09-16T16:37:27.081Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl\", hash = \"sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d\", size = 10095, upload-time = \"2025-09-16T16:37:25.734Z\" },\n]\n\n[[package]]\nname = \"python-dateutil\"\nversion = \"2.9.0.post0\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"six\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz\", hash = \"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3\", size = 342432, upload-time = \"2024-03-01T18:36:20.211Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl\", hash = \"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427\", size = 229892, upload-time = \"2024-03-01T18:36:18.57Z\" },\n]\n\n[[package]]\nname = \"pytz\"\nversion = \"2025.2\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz\", hash = \"sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3\", size = 320884, upload-time = \"2025-03-25T02:25:00.538Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl\", hash = \"sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00\", size = 509225, upload-time = \"2025-03-25T02:24:58.468Z\" },\n]\n\n[[package]]\nname = \"pywin32-ctypes\"\nversion = \"0.2.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz\", hash = \"sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755\", size = 29471, upload-time = \"2024-08-14T10:15:34.626Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl\", hash = \"sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8\", size = 30756, upload-time = \"2024-08-14T10:15:33.187Z\" },\n]\n\n[[package]]\nname = \"pyyaml\"\nversion = \"6.0.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz\", hash = \"sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f\", size = 130960, upload-time = \"2025-09-25T21:33:16.546Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl\", hash = \"sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b\", size = 184227, upload-time = \"2025-09-25T21:31:46.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956\", size = 174019, upload-time = \"2025-09-25T21:31:47.706Z\" },\n { url = \"https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8\", size = 740646, upload-time = \"2025-09-25T21:31:49.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198\", size = 840793, upload-time = \"2025-09-25T21:31:50.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b\", size = 770293, upload-time = \"2025-09-25T21:31:51.828Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0\", size = 732872, upload-time = \"2025-09-25T21:31:53.282Z\" },\n { url = \"https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69\", size = 758828, upload-time = \"2025-09-25T21:31:54.807Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl\", hash = \"sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e\", size = 142415, upload-time = \"2025-09-25T21:31:55.885Z\" },\n { url = \"https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl\", hash = \"sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c\", size = 158561, upload-time = \"2025-09-25T21:31:57.406Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl\", hash = \"sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e\", size = 185826, upload-time = \"2025-09-25T21:31:58.655Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824\", size = 175577, upload-time = \"2025-09-25T21:32:00.088Z\" },\n { url = \"https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c\", size = 775556, upload-time = \"2025-09-25T21:32:01.31Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00\", size = 882114, upload-time = \"2025-09-25T21:32:03.376Z\" },\n { url = \"https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d\", size = 806638, upload-time = \"2025-09-25T21:32:04.553Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a\", size = 767463, upload-time = \"2025-09-25T21:32:06.152Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4\", size = 794986, upload-time = \"2025-09-25T21:32:07.367Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl\", hash = \"sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b\", size = 142543, upload-time = \"2025-09-25T21:32:08.95Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl\", hash = \"sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf\", size = 158763, upload-time = \"2025-09-25T21:32:09.96Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196\", size = 182063, upload-time = \"2025-09-25T21:32:11.445Z\" },\n { url = \"https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0\", size = 173973, upload-time = \"2025-09-25T21:32:12.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28\", size = 775116, upload-time = \"2025-09-25T21:32:13.652Z\" },\n { url = \"https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c\", size = 844011, upload-time = \"2025-09-25T21:32:15.21Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc\", size = 807870, upload-time = \"2025-09-25T21:32:16.431Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e\", size = 761089, upload-time = \"2025-09-25T21:32:17.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea\", size = 790181, upload-time = \"2025-09-25T21:32:18.834Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl\", hash = \"sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5\", size = 137658, upload-time = \"2025-09-25T21:32:20.209Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl\", hash = \"sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b\", size = 154003, upload-time = \"2025-09-25T21:32:21.167Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl\", hash = \"sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd\", size = 140344, upload-time = \"2025-09-25T21:32:22.617Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8\", size = 181669, upload-time = \"2025-09-25T21:32:23.673Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1\", size = 173252, upload-time = \"2025-09-25T21:32:25.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c\", size = 767081, upload-time = \"2025-09-25T21:32:26.575Z\" },\n { url = \"https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5\", size = 841159, upload-time = \"2025-09-25T21:32:27.727Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6\", size = 801626, upload-time = \"2025-09-25T21:32:28.878Z\" },\n { url = \"https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6\", size = 753613, upload-time = \"2025-09-25T21:32:30.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be\", size = 794115, upload-time = \"2025-09-25T21:32:31.353Z\" },\n { url = \"https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl\", hash = \"sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26\", size = 137427, upload-time = \"2025-09-25T21:32:32.58Z\" },\n { url = \"https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl\", hash = \"sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c\", size = 154090, upload-time = \"2025-09-25T21:32:33.659Z\" },\n { url = \"https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl\", hash = \"sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb\", size = 140246, upload-time = \"2025-09-25T21:32:34.663Z\" },\n { url = \"https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac\", size = 181814, upload-time = \"2025-09-25T21:32:35.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310\", size = 173809, upload-time = \"2025-09-25T21:32:36.789Z\" },\n { url = \"https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7\", size = 766454, upload-time = \"2025-09-25T21:32:37.966Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788\", size = 836355, upload-time = \"2025-09-25T21:32:39.178Z\" },\n { url = \"https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5\", size = 794175, upload-time = \"2025-09-25T21:32:40.865Z\" },\n { url = \"https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764\", size = 755228, upload-time = \"2025-09-25T21:32:42.084Z\" },\n { url = \"https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35\", size = 789194, upload-time = \"2025-09-25T21:32:43.362Z\" },\n { url = \"https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl\", hash = \"sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac\", size = 156429, upload-time = \"2025-09-25T21:32:57.844Z\" },\n { url = \"https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl\", hash = \"sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3\", size = 143912, upload-time = \"2025-09-25T21:32:59.247Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3\", size = 189108, upload-time = \"2025-09-25T21:32:44.377Z\" },\n { url = \"https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba\", size = 183641, upload-time = \"2025-09-25T21:32:45.407Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c\", size = 831901, upload-time = \"2025-09-25T21:32:48.83Z\" },\n { url = \"https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl\", hash = \"sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702\", size = 861132, upload-time = \"2025-09-25T21:32:50.149Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c\", size = 839261, upload-time = \"2025-09-25T21:32:51.808Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065\", size = 805272, upload-time = \"2025-09-25T21:32:52.941Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65\", size = 829923, upload-time = \"2025-09-25T21:32:54.537Z\" },\n { url = \"https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl\", hash = \"sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9\", size = 174062, upload-time = \"2025-09-25T21:32:55.767Z\" },\n { url = \"https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl\", hash = \"sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b\", size = 149341, upload-time = \"2025-09-25T21:32:56.828Z\" },\n]\n\n[[package]]\nname = \"setuptools\"\nversion = \"82.0.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz\", hash = \"sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9\", size = 1152316, upload-time = \"2026-03-09T12:47:17.221Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl\", hash = \"sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb\", size = 1006223, upload-time = \"2026-03-09T12:47:15.026Z\" },\n]\n\n[[package]]\nname = \"shapely\"\nversion = \"2.1.2\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"numpy\", version = \"2.2.6\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version < '3.11'\" },\n { name = \"numpy\", version = \"2.4.1\", source = { registry = \"https://pypi.org/simple\" }, marker = \"python_full_version >= '3.11'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz\", hash = \"sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9\", size = 315489, upload-time = \"2025-09-24T13:51:41.432Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl\", hash = \"sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f\", size = 1825959, upload-time = \"2025-09-24T13:50:00.682Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl\", hash = \"sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea\", size = 1629196, upload-time = \"2025-09-24T13:50:03.447Z\" },\n { url = \"https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f\", size = 2951065, upload-time = \"2025-09-24T13:50:05.266Z\" },\n { url = \"https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142\", size = 3058666, upload-time = \"2025-09-24T13:50:06.872Z\" },\n { url = \"https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl\", hash = \"sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4\", size = 3966905, upload-time = \"2025-09-24T13:50:09.417Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl\", hash = \"sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0\", size = 4129260, upload-time = \"2025-09-24T13:50:11.183Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl\", hash = \"sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e\", size = 1544301, upload-time = \"2025-09-24T13:50:12.521Z\" },\n { url = \"https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl\", hash = \"sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f\", size = 1722074, upload-time = \"2025-09-24T13:50:13.909Z\" },\n { url = \"https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618\", size = 1820038, upload-time = \"2025-09-24T13:50:15.628Z\" },\n { url = \"https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d\", size = 1626039, upload-time = \"2025-09-24T13:50:16.881Z\" },\n { url = \"https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09\", size = 3001519, upload-time = \"2025-09-24T13:50:18.606Z\" },\n { url = \"https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26\", size = 3110842, upload-time = \"2025-09-24T13:50:21.77Z\" },\n { url = \"https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7\", size = 4021316, upload-time = \"2025-09-24T13:50:23.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2\", size = 4178586, upload-time = \"2025-09-24T13:50:25.443Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl\", hash = \"sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6\", size = 1543961, upload-time = \"2025-09-24T13:50:26.968Z\" },\n { url = \"https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl\", hash = \"sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc\", size = 1722856, upload-time = \"2025-09-24T13:50:28.497Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94\", size = 1833550, upload-time = \"2025-09-24T13:50:30.019Z\" },\n { url = \"https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359\", size = 1643556, upload-time = \"2025-09-24T13:50:32.291Z\" },\n { url = \"https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3\", size = 2988308, upload-time = \"2025-09-24T13:50:33.862Z\" },\n { url = \"https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b\", size = 3099844, upload-time = \"2025-09-24T13:50:35.459Z\" },\n { url = \"https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc\", size = 3988842, upload-time = \"2025-09-24T13:50:37.478Z\" },\n { url = \"https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d\", size = 4152714, upload-time = \"2025-09-24T13:50:39.9Z\" },\n { url = \"https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl\", hash = \"sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454\", size = 1542745, upload-time = \"2025-09-24T13:50:41.414Z\" },\n { url = \"https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl\", hash = \"sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179\", size = 1722861, upload-time = \"2025-09-24T13:50:43.35Z\" },\n { url = \"https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8\", size = 1832644, upload-time = \"2025-09-24T13:50:44.886Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a\", size = 1642887, upload-time = \"2025-09-24T13:50:46.735Z\" },\n { url = \"https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e\", size = 2970931, upload-time = \"2025-09-24T13:50:48.374Z\" },\n { url = \"https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6\", size = 3082855, upload-time = \"2025-09-24T13:50:50.037Z\" },\n { url = \"https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af\", size = 3979960, upload-time = \"2025-09-24T13:50:51.74Z\" },\n { url = \"https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd\", size = 4142851, upload-time = \"2025-09-24T13:50:53.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl\", hash = \"sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350\", size = 1541890, upload-time = \"2025-09-24T13:50:55.337Z\" },\n { url = \"https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl\", hash = \"sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715\", size = 1722151, upload-time = \"2025-09-24T13:50:57.153Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl\", hash = \"sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40\", size = 1834130, upload-time = \"2025-09-24T13:50:58.49Z\" },\n { url = \"https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl\", hash = \"sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b\", size = 1642802, upload-time = \"2025-09-24T13:50:59.871Z\" },\n { url = \"https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801\", size = 3018460, upload-time = \"2025-09-24T13:51:02.08Z\" },\n { url = \"https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0\", size = 3095223, upload-time = \"2025-09-24T13:51:04.472Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl\", hash = \"sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c\", size = 4030760, upload-time = \"2025-09-24T13:51:06.455Z\" },\n { url = \"https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl\", hash = \"sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99\", size = 4170078, upload-time = \"2025-09-24T13:51:08.584Z\" },\n { url = \"https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl\", hash = \"sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf\", size = 1559178, upload-time = \"2025-09-24T13:51:10.73Z\" },\n { url = \"https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl\", hash = \"sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c\", size = 1739756, upload-time = \"2025-09-24T13:51:12.105Z\" },\n { url = \"https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl\", hash = \"sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223\", size = 1831290, upload-time = \"2025-09-24T13:51:13.56Z\" },\n { url = \"https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c\", size = 1641463, upload-time = \"2025-09-24T13:51:14.972Z\" },\n { url = \"https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df\", size = 2970145, upload-time = \"2025-09-24T13:51:16.961Z\" },\n { url = \"https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf\", size = 3073806, upload-time = \"2025-09-24T13:51:18.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4\", size = 3980803, upload-time = \"2025-09-24T13:51:20.37Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc\", size = 4133301, upload-time = \"2025-09-24T13:51:21.887Z\" },\n { url = \"https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl\", hash = \"sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566\", size = 1583247, upload-time = \"2025-09-24T13:51:23.401Z\" },\n { url = \"https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl\", hash = \"sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c\", size = 1773019, upload-time = \"2025-09-24T13:51:24.873Z\" },\n { url = \"https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl\", hash = \"sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a\", size = 1834137, upload-time = \"2025-09-24T13:51:26.665Z\" },\n { url = \"https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076\", size = 1642884, upload-time = \"2025-09-24T13:51:28.029Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl\", hash = \"sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1\", size = 3018320, upload-time = \"2025-09-24T13:51:29.903Z\" },\n { url = \"https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl\", hash = \"sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0\", size = 3094931, upload-time = \"2025-09-24T13:51:32.699Z\" },\n { url = \"https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26\", size = 4030406, upload-time = \"2025-09-24T13:51:34.189Z\" },\n { url = \"https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0\", size = 4169511, upload-time = \"2025-09-24T13:51:36.297Z\" },\n { url = \"https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl\", hash = \"sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735\", size = 1602607, upload-time = \"2025-09-24T13:51:37.757Z\" },\n { url = \"https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl\", hash = \"sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9\", size = 1796682, upload-time = \"2025-09-24T13:51:39.233Z\" },\n]\n\n[[package]]\nname = \"six\"\nversion = \"1.17.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz\", hash = \"sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81\", size = 34031, upload-time = \"2024-12-04T17:35:28.174Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl\", hash = \"sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274\", size = 11050, upload-time = \"2024-12-04T17:35:26.475Z\" },\n]\n\n[[package]]\nname = \"tomli\"\nversion = \"2.4.1\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz\", hash = \"sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f\", size = 17543, upload-time = \"2026-03-25T20:22:03.828Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl\", hash = \"sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30\", size = 154704, upload-time = \"2026-03-25T20:21:10.473Z\" },\n { url = \"https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl\", hash = \"sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a\", size = 149454, upload-time = \"2026-03-25T20:21:12.036Z\" },\n { url = \"https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076\", size = 237561, upload-time = \"2026-03-25T20:21:13.098Z\" },\n { url = \"https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9\", size = 243824, upload-time = \"2026-03-25T20:21:14.569Z\" },\n { url = \"https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl\", hash = \"sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c\", size = 242227, upload-time = \"2026-03-25T20:21:15.712Z\" },\n { url = \"https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl\", hash = \"sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc\", size = 247859, upload-time = \"2026-03-25T20:21:17.001Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl\", hash = \"sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049\", size = 97204, upload-time = \"2026-03-25T20:21:18.079Z\" },\n { url = \"https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl\", hash = \"sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e\", size = 108084, upload-time = \"2026-03-25T20:21:18.978Z\" },\n { url = \"https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl\", hash = \"sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece\", size = 95285, upload-time = \"2026-03-25T20:21:20.309Z\" },\n { url = \"https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl\", hash = \"sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a\", size = 155924, upload-time = \"2026-03-25T20:21:21.626Z\" },\n { url = \"https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl\", hash = \"sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085\", size = 150018, upload-time = \"2026-03-25T20:21:23.002Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9\", size = 244948, upload-time = \"2026-03-25T20:21:24.04Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5\", size = 253341, upload-time = \"2026-03-25T20:21:25.177Z\" },\n { url = \"https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl\", hash = \"sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585\", size = 248159, upload-time = \"2026-03-25T20:21:26.364Z\" },\n { url = \"https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl\", hash = \"sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1\", size = 253290, upload-time = \"2026-03-25T20:21:27.46Z\" },\n { url = \"https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl\", hash = \"sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917\", size = 98141, upload-time = \"2026-03-25T20:21:28.492Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl\", hash = \"sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9\", size = 108847, upload-time = \"2026-03-25T20:21:29.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl\", hash = \"sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257\", size = 95088, upload-time = \"2026-03-25T20:21:30.677Z\" },\n { url = \"https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl\", hash = \"sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54\", size = 155866, upload-time = \"2026-03-25T20:21:31.65Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl\", hash = \"sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a\", size = 149887, upload-time = \"2026-03-25T20:21:33.028Z\" },\n { url = \"https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897\", size = 243704, upload-time = \"2026-03-25T20:21:34.51Z\" },\n { url = \"https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f\", size = 251628, upload-time = \"2026-03-25T20:21:36.012Z\" },\n { url = \"https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl\", hash = \"sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d\", size = 247180, upload-time = \"2026-03-25T20:21:37.136Z\" },\n { url = \"https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl\", hash = \"sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5\", size = 251674, upload-time = \"2026-03-25T20:21:38.298Z\" },\n { url = \"https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl\", hash = \"sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd\", size = 97976, upload-time = \"2026-03-25T20:21:39.316Z\" },\n { url = \"https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl\", hash = \"sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36\", size = 108755, upload-time = \"2026-03-25T20:21:40.248Z\" },\n { url = \"https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl\", hash = \"sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd\", size = 95265, upload-time = \"2026-03-25T20:21:41.219Z\" },\n { url = \"https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl\", hash = \"sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf\", size = 155726, upload-time = \"2026-03-25T20:21:42.23Z\" },\n { url = \"https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl\", hash = \"sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac\", size = 149859, upload-time = \"2026-03-25T20:21:43.386Z\" },\n { url = \"https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662\", size = 244713, upload-time = \"2026-03-25T20:21:44.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853\", size = 252084, upload-time = \"2026-03-25T20:21:45.62Z\" },\n { url = \"https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl\", hash = \"sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15\", size = 247973, upload-time = \"2026-03-25T20:21:46.937Z\" },\n { url = \"https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl\", hash = \"sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba\", size = 256223, upload-time = \"2026-03-25T20:21:48.467Z\" },\n { url = \"https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl\", hash = \"sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6\", size = 98973, upload-time = \"2026-03-25T20:21:49.526Z\" },\n { url = \"https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl\", hash = \"sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7\", size = 109082, upload-time = \"2026-03-25T20:21:50.506Z\" },\n { url = \"https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl\", hash = \"sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232\", size = 96490, upload-time = \"2026-03-25T20:21:51.474Z\" },\n { url = \"https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl\", hash = \"sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4\", size = 164263, upload-time = \"2026-03-25T20:21:52.543Z\" },\n { url = \"https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl\", hash = \"sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c\", size = 160736, upload-time = \"2026-03-25T20:21:53.674Z\" },\n { url = \"https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl\", hash = \"sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d\", size = 270717, upload-time = \"2026-03-25T20:21:55.129Z\" },\n { url = \"https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl\", hash = \"sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41\", size = 278461, upload-time = \"2026-03-25T20:21:56.228Z\" },\n { url = \"https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl\", hash = \"sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c\", size = 274855, upload-time = \"2026-03-25T20:21:57.653Z\" },\n { url = \"https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl\", hash = \"sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f\", size = 283144, upload-time = \"2026-03-25T20:21:59.089Z\" },\n { url = \"https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl\", hash = \"sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8\", size = 108683, upload-time = \"2026-03-25T20:22:00.214Z\" },\n { url = \"https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl\", hash = \"sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26\", size = 121196, upload-time = \"2026-03-25T20:22:01.169Z\" },\n { url = \"https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl\", hash = \"sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396\", size = 100393, upload-time = \"2026-03-25T20:22:02.137Z\" },\n { url = \"https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl\", hash = \"sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe\", size = 14583, upload-time = \"2026-03-25T20:22:03.012Z\" },\n]\n\n[[package]]\nname = \"tqdm\"\nversion = \"4.67.3\"\nsource = { registry = \"https://pypi.org/simple\" }\ndependencies = [\n { name = \"colorama\", marker = \"sys_platform == 'win32'\" },\n]\nsdist = { url = \"https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz\", hash = \"sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb\", size = 169598, upload-time = \"2026-02-03T17:35:53.048Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl\", hash = \"sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf\", size = 78374, upload-time = \"2026-02-03T17:35:50.982Z\" },\n]\n\n[[package]]\nname = \"typing-extensions\"\nversion = \"4.15.0\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz\", hash = \"sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466\", size = 109391, upload-time = \"2025-08-25T13:49:26.313Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl\", hash = \"sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548\", size = 44614, upload-time = \"2025-08-25T13:49:24.86Z\" },\n]\n\n[[package]]\nname = \"tzdata\"\nversion = \"2025.3\"\nsource = { registry = \"https://pypi.org/simple\" }\nsdist = { url = \"https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz\", hash = \"sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7\", size = 196772, upload-time = \"2025-12-13T17:45:35.667Z\" }\nwheels = [\n { url = \"https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl\", hash = \"sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1\", size = 348521, upload-time = \"2025-12-13T17:45:33.889Z\" },\n]\n" + }, + { + "Score": "0.7492 (agenteval 1.00, tokens 0.34, speed 0.41)", + "Commands": 0, + "ClassifiedFailures": 0, + "RecordedNotCharged": 0, + "EnvironmentFailures": 0, + "SelfRecoveryRate": null, + "UsedBulkDownload": false, + "log": "Question: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 1\nNo classified failures.\nQuestion: \"Which city and state is the point 42.3736, -71.1097 in?\"\nQUESTION which-admin-areas repeat 2\nNo classified failures.\nAgenteval correctness/recovery 1.00 vs 1.00 before the change (unchanged).\n" + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/gepa_state.bin b/experiments/runs/tool-3009509-1787550419/gepa/gepa_state.bin new file mode 100644 index 0000000000000000000000000000000000000000..c397432498eee4241f699dcf4e0f596dac8fdcf8 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/gepa_state.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb3a87b17da2ae86f19591c87b487ab7726b000ab5f0bef05ff46d107e735393 +size 1059589 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/run_log.json b/experiments/runs/tool-3009509-1787550419/gepa/run_log.json new file mode 100644 index 0000000000000000000000000000000000000000..41690fedd7afa320188f1c958bf184a0fb57e869 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/run_log.json @@ -0,0 +1,315 @@ +[ + { + "i": 0, + "selected_program_candidate": 0, + "subsample_ids": [ + 14, + 0, + 23 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 14, + 0, + 23 + ], + "subsample_scores": [ + 0.7930723146636031, + 0.7420040120520545, + 0.8033595502143116 + ], + "new_subsample_scores": [ + 0.6709307321313296, + 0.8190699262889557, + 0.3685717521433308 + ] + } + ], + "subsample_scores": [ + 0.7930723146636031, + 0.7420040120520545, + 0.8033595502143116 + ], + "new_subsample_scores": [ + 0.6709307321313296, + 0.8190699262889557, + 0.3685717521433308 + ] + }, + { + "i": 1, + "selected_program_candidate": 0, + "subsample_ids": [ + 18, + 6, + 5 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 18, + 6, + 5 + ], + "subsample_scores": [ + 0.5142880301496813, + 0.7441952196701009, + 0.8111271403671836 + ], + "new_subsample_scores": [ + 0.3508951211173915, + 0.6711732057063409, + 0.8304485653420294 + ] + } + ], + "subsample_scores": [ + 0.5142880301496813, + 0.7441952196701009, + 0.8111271403671836 + ], + "new_subsample_scores": [ + 0.3508951211173915, + 0.6711732057063409, + 0.8304485653420294 + ] + }, + { + "i": 2, + "selected_program_candidate": 0, + "subsample_ids": [ + 7, + 10, + 22 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 7, + 10, + 22 + ], + "subsample_scores": [ + 0.6865709195745737, + 0.11488293223763285, + 0.0 + ], + "new_subsample_scores": [ + 0.7203050847014602, + 0.41336162342991434, + 0.3436753925402823 + ] + } + ], + "subsample_scores": [ + 0.6865709195745737, + 0.11488293223763285, + 0.0 + ], + "new_subsample_scores": [ + 0.7203050847014602, + 0.41336162342991434, + 0.3436753925402823 + ], + "new_program_idx": 1, + "new_program_indices": [ + 1 + ], + "evaluated_val_indices": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + { + "i": 3, + "selected_program_candidate": 0, + "subsample_ids": [ + 20, + 4, + 2 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 20, + 4, + 2 + ], + "subsample_scores": [ + 0.34074144916029564, + 0.803685809443496, + 0.5168754515700316 + ], + "new_subsample_scores": [ + 0.7707534894437054, + 0.4222620027432347, + 0.3083235744414027 + ] + } + ], + "subsample_scores": [ + 0.34074144916029564, + 0.803685809443496, + 0.5168754515700316 + ], + "new_subsample_scores": [ + 0.7707534894437054, + 0.4222620027432347, + 0.3083235744414027 + ] + }, + { + "i": 4, + "selected_program_candidate": 1, + "subsample_ids": [ + 21, + 3, + 17 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 1, + "subsample_ids": [ + 21, + 3, + 17 + ], + "subsample_scores": [ + 0.8407582531884255, + 0.7294644152101828, + 0.4005437303712991 + ], + "new_subsample_scores": [ + 0.8934305255497577, + 0.8363135692654438, + 0.1956755847275184 + ] + } + ], + "subsample_scores": [ + 0.8407582531884255, + 0.7294644152101828, + 0.4005437303712991 + ], + "new_subsample_scores": [ + 0.8934305255497577, + 0.8363135692654438, + 0.1956755847275184 + ] + }, + { + "i": 5, + "selected_program_candidate": 0, + "subsample_ids": [ + 11, + 19, + 9 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 11, + 19, + 9 + ], + "subsample_scores": [ + 0.2539505549027963, + 0.6137876219800806, + 0.8450232323064226 + ], + "new_subsample_scores": [ + 0.23115927148450138, + 0.712, + 0.8256356117382646 + ] + } + ], + "subsample_scores": [ + 0.2539505549027963, + 0.6137876219800806, + 0.8450232323064226 + ], + "new_subsample_scores": [ + 0.23115927148450138, + 0.712, + 0.8256356117382646 + ], + "new_program_idx": 2, + "new_program_indices": [ + 2 + ], + "evaluated_val_indices": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + { + "i": 6, + "selected_program_candidate": 0, + "subsample_ids": [ + 12, + 15, + 16 + ], + "n_tasks": 1, + "tasks": [ + { + "parent_idx": 0, + "subsample_ids": [ + 12, + 15, + 16 + ], + "subsample_scores": [ + 0.0, + 0.3065089388939636, + 0.40224446100407885 + ], + "new_subsample_scores": [ + 0.8847041642822471, + 0.0, + 0.3528876219564787 + ] + } + ], + "subsample_scores": [ + 0.0, + 0.3065089388939636, + 0.40224446100407885 + ], + "new_subsample_scores": [ + 0.8847041642822471, + 0.0, + 0.3528876219564787 + ], + "new_program_idx": 3, + "new_program_indices": [ + 3 + ], + "evaluated_val_indices": [ + 0, + 1, + 2, + 3, + 4 + ] + } +] \ No newline at end of file diff --git a/experiments/runs/tool-3009509-1787550419/gepa/run_log.txt b/experiments/runs/tool-3009509-1787550419/gepa/run_log.txt new file mode 100644 index 0000000000000000000000000000000000000000..5fb75fdd7f4d84ca8e6750f8614c9e56ab0e2d80 --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/run_log.txt @@ -0,0 +1,1934 @@ +Iteration 0: Base program full valset score: 0.5764396869574474 over 5 / 5 examples +Iteration 1: Selected program 0 score: 0.5764396869574474 +Iteration 1: Proposed new text for .github/dependabot.yml: --- +# Dependabot configuration for botmap. +# +# Why this file matters to the optimization goal +# ---------------------------------------------- +# botmap's agent-usability contract lives in three places: +# * botmap/cli.py — verb surface + the "here is the command to run +# instead" text inside every UsageError +# * botmap/data/skill.md — the brief an agent actually reads +# * botmap/filters.py — the --where parser error that explains shell +# redirection of unquoted > and < +# +# Two runtime dependencies can silently change that contract: +# * click — owns usage/error formatting, option parsing, and `--help` +# rendering. A major bump can reword or reflow the exact strings +# an assistant reads to recover from a wrong first try. +# * pyarrow — owns predicate pushdown and schema introspection, i.e. whether +# a filter returns 0 rows silently (the worst failure mode) or +# raises something the CLI can translate into a hint. +# +# So: keep patch/minor churn batched and low-noise, but force every MAJOR bump +# of a contract-bearing dependency into its own PR that a human reviews +# alongside a run of the agent-usability evals (`just eval`). +# +# NEW FILE NEEDED: docs/agent-contract.md - the policy above (which strings are +# part of the agent-facing contract, and what must be re-run when they change) +# does not belong in a Dependabot config; it belongs in a doc the CLI authors +# and the eval harness can both point at. + +version: 2 +updates: + + # --------------------------------------------------------------------------- + # GitHub Actions — CI pinning hygiene. All actions are pinned to full commit + # SHAs (see .github/workflows/*), so Dependabot is the only thing that moves + # them. Grouped so SHA refreshes arrive as one reviewable PR. + # --------------------------------------------------------------------------- + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + open-pull-requests-limit: 5 + groups: + actions: + patterns: + - "actions/*" + ci-tooling: + patterns: + - "*" + exclude-patterns: + - "actions/*" + labels: + - "bot" + - "ci" + commit-message: + prefix: "[CHORE](deps)" + include: "scope" + cooldown: + default-days: 7 + + # --------------------------------------------------------------------------- + # Python runtime + dev dependencies (pyproject.toml / uv.lock). + # + # Grouping strategy: + # agent-contract-major : click / pyarrow / shapely MAJOR bumps, one PR each. + # These can change error text, help output, or + # filter-pushdown behaviour — i.e. the things the + # agent-usability evals measure. Never batch them. + # runtime-minor : everything else runtime, patch+minor, batched. + # dev-tooling : pytest/pyinstaller/etc., batched, lowest noise. + # --------------------------------------------------------------------------- + - package-ecosystem: "uv" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + open-pull-requests-limit: 5 + versioning-strategy: "increase-if-necessary" + groups: + agent-contract-major: + applies-to: version-updates + patterns: + - "click" + - "pyarrow" + - "shapely" + update-types: + - "major" + runtime-minor: + applies-to: version-updates + patterns: + - "*" + exclude-patterns: + - "pytest*" + - "pyinstaller*" + update-types: + - "minor" + - "patch" + dev-tooling: + applies-to: version-updates + patterns: + - "pytest*" + - "pyinstaller*" + update-types: + - "major" + - "minor" + - "patch" + labels: + - "bot" + - "dependencies" + commit-message: + prefix: "[CHORE](deps)" + prefix-development: "[CHORE](deps-dev)" + include: "scope" + cooldown: + default-days: 7 + + # --------------------------------------------------------------------------- + # Security-only lane: never cooled down, never grouped, never blocked by the + # weekly cadence above. A vulnerable pyarrow/click reaching users is worse + # than an extra PR. + # --------------------------------------------------------------------------- + - package-ecosystem: "uv" + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 + labels: + - "bot" + - "security" + commit-message: + prefix: "[FIX](deps)" + include: "scope" + # Security advisories only — ordinary version bumps are handled above. + ignore: + - dependency-name: "*" + update-types: + - "version-update:semver-major" + - "version-update:semver-minor" + - "version-update:semver-patch" +Iteration 1: New subsample score 1.858572410563616 is not better than old score 2.338435876929969, skipping +Iteration 2: Selected program 0 score: 0.5764396869574474 +Iteration 2: Proposed new text for .github/workflows/build-binaries.yml: --- +# Builds standalone binaries for Linux, macOS (arm64 + x86_64), and Windows. +# On release: attaches binaries directly to the GitHub Release as assets. +# On workflow_dispatch: uploads binaries as workflow artifacts for inspection. +# +# The smoke tests here are deliberately more than `--help`. botmap's primary +# user is an AI assistant that must discover the right verb on its own, so the +# shipped binary is checked against the *agent-facing contract*: +# 1. `--json capabilities` parses and lists every question-shaped verb with +# help text (this is how an assistant learns the surface). +# 2. Wrong-but-reasonable invocations fail with an error that names a +# ready-to-run replacement command (a wrong first try must become a +# correct second try). +# 3. Known discovery gaps are reported as warnings so they stay visible +# instead of silently regressing. +# Contract checks that need no network are fatal; checks that touch Overture +# S3/STAC are advisory so a transient outage never blocks a release. +name: Build Binaries + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read # default; job overrides to write for release asset upload + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + name: Build ${{ matrix.target }} + runs-on: ${{ matrix.os }} + permissions: + contents: write # required to upload release assets via gh release upload + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: linux-x86_64 + ext: "" + - os: macos-latest + target: macos-arm64 + ext: "" + - os: macos-26-intel + target: macos-x86_64 + ext: "" + - os: windows-latest + target: windows-x86_64 + ext: ".exe" + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync --group binary + + - name: Get version + id: version + shell: bash + run: | + VERSION=$(uv run python -c "from importlib.metadata import version; print(version('botmap'))") + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + + - name: Build binary + run: >- + uv run pyinstaller + --onefile + --name botmap + --collect-all pyarrow + --collect-all shapely + --collect-data pyfiglet + botmap/__main__.py + + - name: Rename binary + shell: bash + env: + VERSION: ${{ steps.version.outputs.version }} + TARGET: ${{ matrix.target }} + EXT: ${{ matrix.ext }} + run: | + SRC="dist/botmap${EXT}" + DST="dist/botmap-${VERSION}-${TARGET}${EXT}" + mv "$SRC" "$DST" + echo "BINARY_PATH=${DST}" >> "$GITHUB_ENV" + + - name: Smoke test binary (offline) + shell: bash + run: | + set -euo pipefail + "$BINARY_PATH" --help + "$BINARY_PATH" --version + # Naked invocation must still exit 0 and print help (agents run this + # first to orient themselves). + "$BINARY_PATH" > /dev/null + # Discovery commands must work with no network and no arguments. + "$BINARY_PATH" --json themes > themes.json + "$BINARY_PATH" --json types > types.json + + - name: Agent-surface contract (fatal, offline) + shell: bash + run: | + set -euo pipefail + "$BINARY_PATH" --json capabilities > capabilities.json + uv run python - capabilities.json themes.json types.json <<'PY' + import json, sys + + caps = json.load(open(sys.argv[1], encoding="utf-8")) + themes = json.load(open(sys.argv[2], encoding="utf-8")) + types_ = json.load(open(sys.argv[3], encoding="utf-8")) + + problems = [] + + commands = {c["name"]: c for c in caps["commands"]} + + # Question-shaped verbs an assistant is expected to reach for. + # If any of these vanish, the assistant falls back to bulk `download` + # (the worst outcome), so their absence must fail the build. + required = { + # place-name resolution / geometry + "where", "boundary", "containing", "at", + # cheap previews before paying for data + "count", "sample", + # intent verbs (one per common entity) + "places", "buildings", "roads", "addresses", "water", "landuse", + # self-discovery + "themes", "types", "schema", "categories", "capabilities", + # escape hatch + agent onboarding + "download", "install-skill", + } + missing = sorted(required - set(commands)) + if missing: + problems.append("missing commands: " + ", ".join(missing)) + + # An assistant reads `help` to choose a verb. A verb with no help text + # is effectively undiscoverable. + undocumented = sorted( + name for name, c in commands.items() + if not (c.get("help") or "").strip() + ) + if undocumented: + problems.append("commands with no help text: " + ", ".join(undocumented)) + + # Every intent verb must accept both ways of naming an area, and a + # limit, otherwise agents hand-build bboxes or stream unbounded output. + for verb in ("places", "buildings", "roads", "addresses", "water", "landuse"): + cmd = commands.get(verb) + if cmd is None: + continue + flags = {f for p in cmd["params"] for f in p.get("flags", [])} + for needed in ("--in", "--bbox", "--limit"): + if needed not in flags: + problems.append(f"{verb} is missing {needed}") + + if len(themes) != 6: + problems.append(f"expected 6 themes, got {len(themes)}") + if len(types_) != 15: + problems.append(f"expected 15 types, got {len(types_)}") + for t in types_: + if not (t.get("description") or "").strip(): + problems.append(f"type {t['name']} has no description") + + if problems: + for p in problems: + print(f"::error::agent-surface contract: {p}") + sys.exit(1) + print(f"agent-surface contract OK: {len(commands)} commands, " + f"{len(themes)} themes, {len(types_)} types") + PY + + - name: Error messages name a replacement command (advisory) + # Advisory: these invocations touch Overture STAC/S3 for release + # validation, so a transient outage must not block a release. Failures + # still surface as warnings in the job log and step summary. + continue-on-error: true + shell: bash + run: | + set -uo pipefail + FAILED=0 + + # Assert: the command fails AND its output contains $1 (the concrete + # replacement an assistant should run next). + expect_redirect() { + local needle="$1"; shift + local label="$1"; shift + local out + if out=$("$@" 2>&1); then + echo "::warning::[$label] expected a non-zero exit from: $*" + FAILED=1 + return + fi + case "$out" in + *"$needle"*) + echo "OK [$label] error names '$needle'" + ;; + *) + echo "::warning::[$label] error did not mention '$needle'" + printf '%s\n' "$out" + FAILED=1 + ;; + esac + } + + # 1. Boundary polygons: `download -t division_area` must redirect to + # the dedicated `boundary` verb rather than crash or return rows. + expect_redirect "boundary" "division_area" \ + "$BINARY_PATH" download -t division_area --in "Alameda County, CA" -f geojsonseq + + # 2. Transit stops are `place` features, not infrastructure. + expect_redirect "places --category bus_stop" "transit-infra" \ + "$BINARY_PATH" download -t infrastructure \ + --bbox -73.99,40.70,-73.97,40.72 --where class=bus_stop -f geojsonseq + + # 3. An unbounded intent verb must say exactly what to add. + expect_redirect "Provide --in or --bbox" "unbounded-verb" \ + "$BINARY_PATH" places -f geojsonseq + + # 4. The classic shell-ate-my-'>' mistake must be explained, not + # reported as a generic parse error. + expect_redirect "single quote" "where-quoting" \ + "$BINARY_PATH" buildings --bbox -71.07,42.35,-71.06,42.36 \ + --where height -f geojsonseq + + # 5. A bad place name must offer a recovery path, not silence. + expect_redirect "--bbox" "no-such-place" \ + "$BINARY_PATH" where "Nowherevilleistan" + + if [ "$FAILED" -ne 0 ]; then + echo "::warning::one or more error-message contracts regressed (advisory)" + fi + { + echo "### botmap error-message contract (${{ matrix.target }})" + if [ "$FAILED" -eq 0 ]; then + echo "All wrong-first-try invocations named a ready-to-run replacement." + else + echo "Some invocations did **not** name a replacement command — see job log." + fi + } >> "$GITHUB_STEP_SUMMARY" + + - name: Discovery-gap audit (advisory) + # Reports, without failing the build, the places where an assistant's + # reasonable next step still dead-ends. Keeps known gaps visible on + # every release instead of rediscovering them from eval transcripts. + continue-on-error: true + shell: bash + run: | + set -uo pipefail + GAPS=0 + note_gap() { + echo "::warning::discovery gap: $1" + echo "- $1" >> "$GITHUB_STEP_SUMMARY" + GAPS=1 + } + + echo "### botmap discovery-gap audit (${{ matrix.target }})" >> "$GITHUB_STEP_SUMMARY" + + # "What kinds of X are here?" is the canonical discovery question. + # It should work for any classified type, not just `place`. + CAMBRIDGE_BBOX="-71.16,42.35,-71.07,42.41" + for T in place building land_use water segment; do + if "$BINARY_PATH" --json categories -t "$T" --bbox "$CAMBRIDGE_BBOX" --top 5 \ + > "cat-$T.json" 2> "cat-$T.err"; then + echo "OK categories -t $T enumerated values" + else + note_gap "\`categories -t $T\` cannot enumerate values ($(head -c 200 "cat-$T.err" | tr '\n' ' '))" + fi + done + + # A near-miss category must come back with a suggestion on stderr, + # otherwise the assistant reads 0 rows as "there are none". + "$BINARY_PATH" places --bbox "$CAMBRIDGE_BBOX" \ + --category tattoo_shop -f geojsonseq -n 5 > tattoo.jsonl 2> tattoo.err || true + if [ ! -s tattoo.jsonl ] && ! grep -qi "did you mean" tattoo.err; then + note_gap "zero-result \`places --category\` returned no suggestion (silent empty result)" + fi + + if [ "$GAPS" -eq 0 ]; then + echo "No discovery gaps detected." >> "$GITHUB_STEP_SUMMARY" + fi + + - name: Upload to release + if: github.event_name == 'release' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.ref_name }} + run: gh release upload "$TAG" "$BINARY_PATH" --clobber + + - name: Upload artifact (dry run) + if: github.event_name == 'workflow_dispatch' + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: botmap-${{ matrix.target }} + path: ${{ env.BINARY_PATH }} + if-no-files-found: error +Iteration 2: New subsample score 1.8525168921657618 is not better than old score 2.069610390186966, skipping +Iteration 3: Selected program 0 score: 0.5764396869574474 +Iteration 3: Proposed new text for .github/workflows/publish-pypi.yml: --- +# Publishes the botmap package in two scenarios: +# 1. Release (production): triggered when a GitHub Release is published → publishes to PyPI. +# 2. Dry-run: triggered manually via workflow_dispatch → publishes to Test PyPI to verify +# the build and publish pipeline end-to-end without affecting the production package index. +# Uses OIDC trusted publishing — no API token required. +# +# botmap is an agent-facing CLI: its primary user is an LLM assistant that is handed a +# plain-English question and must derive the right command unaided. Two artifacts decide +# whether that works: (a) the bundled Skill (botmap/data/skill.md), which is how an agent +# discovers the verbs at all, and (b) the `capabilities` manifest, which is how an agent +# self-describes the surface at runtime. Both are easy to break silently in a wheel. +# This workflow therefore gates publication on an agent-usability guard, and reports +# (without blocking) on the argument spellings agents are observed to reach for first. +name: Publish botmap + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read # required to checkout the code from the repo + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + name: Build + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + + - name: Build package + run: uv build + + - name: Read package version + id: version + shell: bash + run: | + set -euo pipefail + VERSION=$(uv run --no-project python - <<'PY' + import re, pathlib + text = pathlib.Path("pyproject.toml").read_text() + m = re.search(r'^version\s*=\s*"([^"]+)"', text, re.M) + print(m.group(1)) + PY + ) + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "Package version: ${VERSION}" + + - name: Check release tag matches package version + if: github.event_name == 'release' + shell: bash + env: + TAG: ${{ github.ref_name }} + VERSION: ${{ steps.version.outputs.version }} + run: | + set -euo pipefail + NORMALIZED="${TAG#v}" + if [ "$NORMALIZED" != "$VERSION" ]; then + echo "::error::Release tag '${TAG}' does not match pyproject version '${VERSION}'." + echo "Fix: bump 'version' in pyproject.toml to ${NORMALIZED}, or retag the release as v${VERSION}." + exit 1 + fi + echo "Tag ${TAG} matches version ${VERSION}." + + # The Skill is how an agent discovers this CLI at all. A wheel that omits it + # publishes a tool no assistant can find, so treat its absence as fatal. + - name: Verify the agent Skill is packaged in the wheel + shell: bash + run: | + set -euo pipefail + WHEEL=$(ls dist/*.whl | head -n 1) + echo "Inspecting ${WHEEL}" + if ! unzip -l "$WHEEL" | grep -q 'botmap/data/skill.md'; then + echo "::error::botmap/data/skill.md is missing from ${WHEEL}." + echo "Without it, 'botmap install-skill' installs nothing and agents cannot discover the verbs." + echo "Fix: ensure [tool.hatch.build.targets.wheel] packages = [\"botmap\"] includes the data dir." + exit 1 + fi + echo "Skill file present." + + - name: Upload dist artifacts + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: dist + path: dist/ + + agent-usability-guard: + name: Agent-usability guard + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Download dist artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: dist + path: dist/ + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + + - name: Install the built wheel into a clean venv + shell: bash + run: | + set -euo pipefail + WHEEL=$(ls dist/*.whl | head -n 1) + uv venv .verify + uv pip install --python .verify/bin/python "$WHEEL" + echo "VERIFY_PY=$PWD/.verify/bin/python" >> "$GITHUB_ENV" + + - name: CLI starts and prints help + shell: bash + run: | + set -euo pipefail + "$VERIFY_PY" -m botmap --help > /dev/null + "$VERIFY_PY" -m botmap --version + + # An assistant that has forgotten the surface runs `--json capabilities`. + # If that manifest is incomplete, the assistant falls back to the bulk + # `download` escape hatch, which is the worst outcome we measure. + - name: Capabilities manifest is complete and self-describing + shell: bash + run: | + set -euo pipefail + "$VERIFY_PY" -m botmap --json capabilities > capabilities.json + "$VERIFY_PY" - <<'PY' + import json, sys + + data = json.load(open("capabilities.json")) + commands = {c["name"]: c for c in data["commands"]} + + # Verbs an assistant is expected to reach for straight from a + # plain-English question. Any missing entry means the question-shaped + # path is undiscoverable and `download` becomes the default answer. + required = [ + "where", "boundary", "count", "sample", + "places", "buildings", "roads", "addresses", "water", "landuse", + "at", "containing", + "themes", "types", "schema", "categories", "capabilities", + "install-skill", "download", + ] + missing = [name for name in required if name not in commands] + if missing: + sys.exit(f"capabilities manifest is missing commands: {missing}") + + undocumented = sorted( + name for name, cmd in commands.items() if not (cmd.get("help") or "").strip() + ) + if undocumented: + sys.exit( + "every command needs a one-line help string an agent can read; " + f"missing help for: {undocumented}" + ) + + # Location arguments are what turn a place name into a query. Each + # data verb must accept at least one of --in / --bbox / a positional. + location_verbs = [ + "places", "buildings", "roads", "addresses", "water", "landuse", + "count", "sample", + ] + for name in location_verbs: + flags = { + flag + for param in commands[name]["params"] + for flag in param.get("flags", []) + } + if not ({"--in", "--bbox"} & flags): + sys.exit(f"{name} accepts neither --in nor --bbox") + + print(f"capabilities OK: {len(commands)} commands, all documented") + PY + + - name: Discovery commands are machine-readable + shell: bash + run: | + set -euo pipefail + for cmd in themes types; do + "$VERIFY_PY" -m botmap --json "$cmd" > "${cmd}.json" + "$VERIFY_PY" -c "import json,sys; d=json.load(open('${cmd}.json')); sys.exit('empty ${cmd}') if not d else print('${cmd}: %d entries' % len(d))" + done + + - name: Installed Skill is readable and non-trivial + shell: bash + run: | + set -euo pipefail + "$VERIFY_PY" - <<'PY' + from importlib import resources + import sys + + text = (resources.files("botmap") / "data" / "skill.md").read_text() + if len(text) < 1000: + sys.exit("skill.md looks truncated") + for marker in ("name: botmap", "When to reach for this CLI", "Anti-patterns"): + if marker not in text: + sys.exit(f"skill.md is missing the {marker!r} section") + print(f"skill.md OK ({len(text)} chars)") + PY + + - name: install-skill writes a discoverable Skill + shell: bash + run: | + set -euo pipefail + WORK=$(mktemp -d) + cd "$WORK" + HOME="$WORK" "$VERIFY_PY" -m botmap install-skill --target claude-user --yes + test -s "$WORK/.claude/skills/botmap/SKILL.md" + HOME="$WORK" "$VERIFY_PY" -m botmap install-skill --target agents-md --yes + grep -q 'botmap:start' AGENTS.md + echo "install-skill OK" + + # Hard failures must still teach. Every non-zero exit an assistant can + # trigger from a first guess should name a runnable replacement, so the + # wrong first try becomes a correct second try. + - name: Errors carry a runnable next action + shell: bash + run: | + set -euo pipefail + fail=0 + + expect_suggestion() { + local label="$1"; shift + local out + out=$("$VERIFY_PY" -m botmap "$@" 2>&1 || true) + if printf '%s' "$out" | grep -Eq '(botmap [a-z-]+|--bbox|--in |--help)'; then + echo "ok ${label}" + else + echo "::error::${label}: error output offers no next action" + printf '%s\n' "$out" | sed 's/^/ /' + fail=1 + fi + } + + # A place name that is not in the divisions index. + expect_suggestion "unknown place" where "Zzzqxville, ZZ" + # A boundary polygon requested through the retired path. + expect_suggestion "division_area redirect" download -t division_area -f geojsonseq --bbox -71.07,42.35,-71.06,42.36 + # An attribute filter whose operator the shell ate. + expect_suggestion "operator-less --where" count -t building --bbox -71.07,42.35,-71.06,42.36 --where height + # A verb invoked without any spatial bound. + expect_suggestion "unbounded addresses" addresses --street Main -f geojsonseq + # categories on a type whose classifying field is `class`. + expect_suggestion "categories on land_use" categories -t land_use --bbox -71.07,42.35,-71.06,42.36 + + exit "$fail" + + # Advisory, non-blocking: the argument spellings assistants are observed + # to try first. Each line that reports FIRST-TRY MISS is a concrete + # candidate for accepting the obvious spelling alongside the official one. + - name: Report first-try spellings assistants reach for + continue-on-error: true + shell: bash + run: | + set -uo pipefail + miss=0 + + probe() { + local label="$1"; shift + local out rc + out=$("$VERIFY_PY" -m botmap "$@" 2>&1); rc=$? + if printf '%s' "$out" | grep -q 'No such option'; then + echo "FIRST-TRY MISS ${label}" + printf '%s\n' "$out" | grep 'No such option' | sed 's/^/ /' + miss=$((miss + 1)) + else + echo "accepted ${label} (exit ${rc})" + fi + } + + # "roads near this point" -> --class on the proximity primitive + probe 'at ... -t segment --class motorway' \ + at 42.3601,-71.0589 -t segment --radius 300 --class motorway -n 1 + # negative longitude first, so the coordinate looks like an option + probe 'containing -71.09,42.39 (leading minus)' \ + containing -71.0912,42.3959 + # trailing --json appended out of habit on a data verb + probe 'at ... --json' \ + at 42.3601,-71.0589 -t place -n 1 --json + # -o on a metadata command that already writes to stdout + probe 'where ... --geometry -o FILE' \ + where "Boston, MA" --geometry -o /tmp/boundary.geojson + # short radius flag on a proximity query + probe 'at ... -r 300 (radius, not release)' \ + at 42.3601,-71.0589 -t place -r 300 -n 1 + + echo + echo "first-try misses: ${miss}" + if [ "$miss" -gt 0 ]; then + echo "Each miss above is an accepted-spelling gap: teach the flag, or reject it" + echo "with a message naming the exact replacement command." + fi + exit 0 + + publish: + name: Target '${{ github.event_name == 'workflow_dispatch' && 'Test PyPI' || 'PyPI' }}' + needs: [build, agent-usability-guard] + runs-on: ubuntu-latest + environment: ${{ github.event_name == 'workflow_dispatch' && 'test-pypi' || 'pypi' }} + env: + TEST_PYPI_URL: https://test.pypi.org/legacy/ + permissions: + id-token: write # OIDC — required for PyPI trusted publishing + steps: + - name: Download dist artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: dist + path: dist/ + + - name: Publish + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 + with: + repository-url: ${{ github.event_name == 'workflow_dispatch' && env.TEST_PYPI_URL || '' }} + skip-existing: ${{ github.event_name == 'workflow_dispatch' }} # Don't fail on version conflicts during test-publishing + attestations: true + verbose: false + + rollup-publish-status: + name: Check publish results + if: always() + needs: [build, agent-usability-guard, publish] + runs-on: ubuntu-latest + permissions: {} + steps: + - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3 + with: + jobs: ${{ toJSON(needs) }} +Iteration 3: Accepted candidate (subsample score 0.8014538518122065 -> 1.4773421006716567); running full eval. +Iteration 3: Valset score for new program: 0.479827106072882 (coverage 5 / 5) +Iteration 3: Val aggregate for new program: 0.479827106072882 +Iteration 3: Individual valset scores for new program: {0: 0.2817419412850503, 1: 0.22333647963012715, 2: 0.42660383938167434, 3: 0.7636919896882387, 4: 0.7037612803793193} +Iteration 3: New valset pareto front scores: {0: 0.31134718785027904, 1: 0.5852731858971623, 2: 0.8157275694683133, 3: 0.8279580379044169, 4: 0.7037612803793193} +Iteration 3: Valset pareto front aggregate score: 0.6488134522998983 +Iteration 3: Updated valset pareto front programs: {0: {0}, 1: {0}, 2: {0}, 3: {0}, 4: {1}} +Iteration 3: Best valset aggregate score so far: 0.5764396869574474 +Iteration 3: Best program as per aggregate score on valset: 0 +Iteration 3: Best score on valset: 0.5764396869574474 +Iteration 3: Linear pareto front program index: 0 +Iteration 3: New program candidate index: 1 +Iteration 4: Selected program 0 score: 0.5764396869574474 +Iteration 4: Proposed new text for .github/workflows/test-run.yml: --- +# CI for botmap. +# +# botmap's primary user is an LLM agent that gets one plain-English question and +# has to find the right command on its own. So this workflow tests two things: +# +# 1. the code works (unit + integration tests), and +# 2. the *interface contract an agent depends on* still holds: +# - no raw Python traceback ever reaches the user (worst failure mode #2) +# - a failure names the problem AND gives a runnable next command +# - zero rows are explained, never returned silently (worst failure mode #1) +# - every convenience verb is discoverable (capabilities + skill.md) +# - stdout is pure data; diagnostics go to stderr +# +# Contract checks that assert *known-good* behaviour fail the build. Checks for +# behaviour we are still driving toward emit ::warning:: annotations plus a job +# summary, so regressions are visible on every PR without blocking main. +# +# Requests for files this workflow needs but cannot create: +# NEW FILE NEEDED: tests/test_cli_offline_errors.py - the "no traceback, actionable message on network/S3 failure" contract needs unit coverage, not just a CI shell probe +# NEW FILE NEEDED: botmap/errors.py - STAC/S3 failures should route through one handler that prints "problem + ready-to-run replacement" instead of a raw traceback +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read # required to checkout the code from the repo + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # Small, cheap bbox over Boston. Used by every live smoke check. + SMOKE_BBOX: "-71.068,42.353,-71.058,42.363" + # Mid-Atlantic open ocean: guaranteed to match nothing for any type. + EMPTY_BBOX: "-40.10,20.10,-40.00,20.20" + # Unroutable proxy: makes every outbound HTTP(S) call fail fast, so we can + # assert on the *shape* of the failure the agent sees. + BLACKHOLE_PROXY: "http://127.0.0.1:9" + +defaults: + run: + shell: bash + +jobs: + unit: + name: Unit tests (py${{ matrix.python-version }}) + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: uv sync --dev + + - name: Import guard (a file that will not import scores zero) + run: uv run python -c "import botmap, botmap.cli, botmap.__main__; print('import ok')" + + - name: Run unit tests + run: uv run pytest tests/ -v -m "not integration" + + agent-contract: + name: Agent contract (offline) + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + python-version: "3.12" + + - name: Install dependencies + run: uv sync --dev + + # --- Discovery surface: an agent must be able to find the verbs. -------- + - name: Self-description works with no network + env: + http_proxy: ${{ env.BLACKHOLE_PROXY }} + https_proxy: ${{ env.BLACKHOLE_PROXY }} + HTTP_PROXY: ${{ env.BLACKHOLE_PROXY }} + HTTPS_PROXY: ${{ env.BLACKHOLE_PROXY }} + run: | + set -uo pipefail + failed=0 + for args in "--help" "--json capabilities" "--json themes" "--json types"; do + if ! out=$(uv run botmap $args 2>err.txt); then + echo "::error::\`botmap $args\` must work without network access" + cat err.txt + failed=1 + continue + fi + if grep -q 'Traceback (most recent call last)' err.txt; then + echo "::error::\`botmap $args\` leaked a Python traceback" + cat err.txt + failed=1 + fi + case "$args" in + --json*) + printf '%s' "$out" | uv run python -c "import json,sys; json.load(sys.stdin)" \ + || { echo "::error::\`botmap $args\` did not emit a single JSON document on stdout"; failed=1; } + ;; + esac + done + exit "$failed" + + - name: Every convenience verb is registered and documented + env: + http_proxy: ${{ env.BLACKHOLE_PROXY }} + https_proxy: ${{ env.BLACKHOLE_PROXY }} + HTTP_PROXY: ${{ env.BLACKHOLE_PROXY }} + HTTPS_PROXY: ${{ env.BLACKHOLE_PROXY }} + run: | + set -uo pipefail + uv run botmap --json capabilities > caps.json + failed=0 + + # 1. Hard requirement: these verbs must exist. Losing one sends the + # agent back to the bulk `download` escape hatch. + for verb in places buildings roads water landuse addresses at containing \ + where boundary count sample categories schema themes types \ + capabilities download gers install-skill; do + if ! uv run python - "$verb" <<'PY' + import json, sys + verb = sys.argv[1] + caps = json.load(open("caps.json")) + names = {c["name"] for c in caps["commands"]} + sys.exit(0 if verb in names else 1) + PY + then + echo "::error::command '$verb' is missing from \`botmap capabilities\`" + failed=1 + fi + done + + # 2. Hard requirement: the shipped Skill teaches the verbs an agent + # needs for the common questions. + for verb in places buildings roads water landuse addresses at containing \ + where count sample categories schema capabilities; do + grep -q "botmap $verb" botmap/data/skill.md \ + || { echo "::error::botmap/data/skill.md has no \`botmap $verb\` example; agents will not discover it"; failed=1; } + done + + # 3. Soft signal: verbs that exist but are undocumented / unhelped. + uv run python <<'PY' >> "$GITHUB_STEP_SUMMARY" + import json, pathlib + caps = json.load(open("caps.json")) + skill = pathlib.Path("botmap/data/skill.md").read_text() + missing_help = [c["name"] for c in caps["commands"] if not (c.get("help") or "").strip()] + undocumented = [ + c["name"] for c in caps["commands"] + if c["name"] not in skill and " " not in c["name"] + ] + print("### Agent discoverability\n") + print(f"- commands exposed: **{len(caps['commands'])}**") + for name in missing_help: + print(f"::warning::command '{name}' has no help text; an agent reading " + f"`capabilities` cannot tell what it does") + for name in undocumented: + print(f"::warning::command '{name}' is not mentioned in botmap/data/skill.md") + if missing_help: + print(f"- commands with no help text: `{'`, `'.join(missing_help)}`") + if undocumented: + print(f"- commands absent from skill.md: `{'`, `'.join(undocumented)}`") + PY + exit "$failed" + + # --- Failure shape: a wrong first try must become a right second try. --- + - name: Network failures fail clean, not with a traceback + env: + http_proxy: ${{ env.BLACKHOLE_PROXY }} + https_proxy: ${{ env.BLACKHOLE_PROXY }} + HTTP_PROXY: ${{ env.BLACKHOLE_PROXY }} + HTTPS_PROXY: ${{ env.BLACKHOLE_PROXY }} + run: | + set -uo pipefail + failed=0 + + check_clean() { + local desc="$1"; shift + local out code + out=$( { "$@"; } 2>&1 ) + code=$? + printf '── %s (exit %s)\n%s\n\n' "$desc" "$code" "$out" + if printf '%s' "$out" | grep -q 'Traceback (most recent call last)'; then + echo "::error::$desc: raw Python traceback reached the user" + failed=1 + fi + if [ "$code" -eq 0 ]; then + echo "::error::$desc: exited 0 with no data source reachable" + failed=1 + fi + if ! printf '%s' "$out" \ + | grep -qiE 'network|connect|unreachable|offline|timed out|could not (fetch|reach)|try again|retry'; then + echo "::warning::$desc: the error does not name the problem or suggest a next action" + fi + } + + check_clean "count --bbox with no network" \ + uv run botmap count -t place --bbox "$SMOKE_BBOX" + check_clean "places --bbox with no network" \ + uv run botmap places --bbox "$SMOKE_BBOX" --category coffee_shop -f geojsonseq + check_clean "where with no network" \ + uv run botmap where "Boston, MA" + check_clean "download with no network" \ + uv run botmap download -t building --bbox "$SMOKE_BBOX" -f geojsonseq + exit "$failed" + + - name: Common agent spellings are accepted, not rejected as bad options + env: + http_proxy: ${{ env.BLACKHOLE_PROXY }} + https_proxy: ${{ env.BLACKHOLE_PROXY }} + HTTP_PROXY: ${{ env.BLACKHOLE_PROXY }} + HTTPS_PROXY: ${{ env.BLACKHOLE_PROXY }} + run: | + set -uo pipefail + # Option parsing happens before any network call, so a "No such + # option" here is a real interface defect regardless of connectivity. + failed=0 + expect_option_accepted() { + local desc="$1"; shift + local out + out=$( { "$@"; } 2>&1 ) + if printf '%s' "$out" | grep -qiE "no such option|no such command|got unexpected extra"; then + echo "::error::$desc: the CLI rejected an obvious spelling an agent will try" + printf '%s\n' "$out" + failed=1 + fi + } + expect_option_accepted "trailing --json on a data verb" \ + uv run botmap places --bbox "$SMOKE_BBOX" --category coffee_shop --json + expect_option_accepted "trailing --json on \`at\`" \ + uv run botmap at 42.3601,-71.0589 -t place --radius 150 --json + expect_option_accepted "-n/--limit on a data verb" \ + uv run botmap places --bbox "$SMOKE_BBOX" -n 5 + expect_option_accepted "--geojson alias on where" \ + uv run botmap where "Boston, MA" --geojson + exit "$failed" + + - name: Argument errors teach (bbox, filters, coordinates) + env: + http_proxy: ${{ env.BLACKHOLE_PROXY }} + https_proxy: ${{ env.BLACKHOLE_PROXY }} + HTTP_PROXY: ${{ env.BLACKHOLE_PROXY }} + HTTPS_PROXY: ${{ env.BLACKHOLE_PROXY }} + run: | + set -uo pipefail + failed=0 + expect_message() { + local desc="$1" pattern="$2"; shift 2 + local out + out=$( { "$@"; } 2>&1 ) + printf '── %s\n%s\n\n' "$desc" "$out" + if printf '%s' "$out" | grep -q 'Traceback (most recent call last)'; then + echo "::error::$desc: raw Python traceback instead of a usage error" + failed=1 + fi + if ! printf '%s' "$out" | grep -qiE "$pattern"; then + echo "::error::$desc: message must match /$pattern/ so the retry is obvious" + failed=1 + fi + } + expect_message "malformed bbox" "exactly 4 values|example" \ + uv run botmap count -t place --bbox "1,2,3" + expect_message "swapped bbox bounds" "xmin|xmax" \ + uv run botmap count -t place --bbox "10,42,-10,43" + expect_message "shell ate an unquoted >" "no operator|single.quote|K OP V" \ + uv run botmap count -t building --bbox "$SMOKE_BBOX" --where height + expect_message "bad lat,lon" "LAT,LON|numeric" \ + uv run botmap at "not-a-point" + expect_message "--in and --bbox together" "mutually exclusive" \ + uv run botmap places --in "Boston, MA" --bbox "$SMOKE_BBOX" + expect_message "no location given" "Provide --in or --bbox" \ + uv run botmap places -f geojsonseq + exit "$failed" + + live-smoke: + name: Live smoke + integration + runs-on: ubuntu-latest + timeout-minutes: 45 + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + python-version: "3.12" + + - name: Install dependencies + run: uv sync --dev + + - name: Write retry helper + run: | + cat > retry.sh <<'SH' + # retry — Overture S3/STAC is occasionally flaky; + # retrying keeps transient network faults from being read as tool defects. + retry() { + local attempts="$1"; shift + local n=1 + while true; do + if "$@"; then return 0; fi + if [ "$n" -ge "$attempts" ]; then + echo "::warning::gave up after $n attempt(s): $*" + return 1 + fi + echo "::notice::attempt $n failed, retrying in $((n * 15))s: $*" + sleep $((n * 15)) + n=$((n + 1)) + done + } + SH + + - name: Bulk download smoke test (stdout must be pure data) + run: | + set -uo pipefail + source ./retry.sh + retry 3 uv run botmap download --bbox="$SMOKE_BBOX" -f geojson \ + --type=building -o boston.geojson || exit 1 + uv run python -c "import json;d=json.load(open('boston.geojson'));assert d['type']=='FeatureCollection';print(len(d['features']),'features')" + # stdout mode must be parseable with no diagnostic bytes mixed in. + retry 3 uv run botmap sample -t building --bbox "$SMOKE_BBOX" -n 3 \ + -f geojsonseq > sample.jsonl || exit 1 + uv run python -c " + import json + lines=[l for l in open('sample.jsonl') if l.strip()] + assert lines, 'sample emitted nothing' + for l in lines: json.loads(l) + print('stdout clean:', len(lines), 'features') + " + + - name: Question-shaped verbs answer without the download escape hatch + run: | + set -uo pipefail + source ./retry.sh + failed=0 + retry 3 uv run botmap --json where "Boston, MA" > where.json || failed=1 + uv run python -c " + import json;d=json.load(open('where.json')) + assert d['region']=='US-MA', d + assert len(d['bbox'])==4 + print('where ok', d['name'], d['bbox']) + " || failed=1 + + retry 3 uv run botmap --json count -t place --bbox "$SMOKE_BBOX" > count.json || failed=1 + uv run python -c " + import json;d=json.load(open('count.json')) + assert d['count']>0, d + print('count ok', d['count']) + " || failed=1 + + retry 3 uv run botmap --json containing 42.3601,-71.0589 > containing.json || failed=1 + uv run python -c " + import json;d=json.load(open('containing.json')) + assert any(x['subtype']=='country' for x in d), d + print('containing ok', [x['subtype'] for x in d]) + " || failed=1 + exit "$failed" + + - name: Zero rows must be explained, never returned silently + run: | + set -uo pipefail + source ./retry.sh + { + echo "### Zero-result explanations" + echo + } >> "$GITHUB_STEP_SUMMARY" + + # (a) A category that cannot exist in this bbox. + out=$( { retry 2 uv run botmap places --bbox "$SMOKE_BBOX" \ + --category definitely_not_a_category -f geojsonseq; } 2>&1 ) + printf '%s\n' "$out" + if printf '%s' "$out" | grep -qiE "0 rows|did you mean|not present|no place has"; then + echo "- bogus \`--category\` in a populated bbox: explained ✅" >> "$GITHUB_STEP_SUMMARY" + else + echo "::warning::places --category returned no rows with no explanation; an agent reads that as 'there are none'" + echo "- bogus \`--category\` in a populated bbox: **silent** ⚠️" >> "$GITHUB_STEP_SUMMARY" + fi + + # (b) An empty area of ocean: the answer really is zero, but the CLI + # should still say why rather than printing nothing. + out=$( { retry 2 uv run botmap places --bbox "$EMPTY_BBOX" \ + --category coffee_shop -f geojsonseq; } 2>&1 ) + printf '%s\n' "$out" + if printf '%s' "$out" | grep -qiE "0 rows|no data|no features|nothing (matched|found)"; then + echo "- empty ocean bbox: explained ✅" >> "$GITHUB_STEP_SUMMARY" + else + echo "::warning::an empty bbox produced zero output and zero explanation; add a '0 rows in this bbox' note on stderr" + echo "- empty ocean bbox: **silent** ⚠️" >> "$GITHUB_STEP_SUMMARY" + fi + + # (c) A class value that is absent from a region (the Malta case): + # count must not answer 0 without saying the value is unknown here. + out=$( { retry 2 uv run botmap --json count -t segment \ + --bbox "$SMOKE_BBOX" --where class=definitely_not_a_class; } 2>&1 ) + printf '%s\n' "$out" + if printf '%s' "$out" | grep -qiE "did you mean|not present|no segment has|schema|categories"; then + echo "- bogus \`--where class=\` on count: explained ✅" >> "$GITHUB_STEP_SUMMARY" + else + echo "::warning::count returned a bare 0 for an impossible class value; suggest \`botmap schema -t segment\` or near-matches instead" + echo "- bogus \`--where class=\` on count: **silent** ⚠️" >> "$GITHUB_STEP_SUMMARY" + fi + + - name: Blocked paths redirect to a runnable replacement command + run: | + set -uo pipefail + failed=0 + expect_redirect() { + local desc="$1" pattern="$2"; shift 2 + local out code + out=$( { "$@"; } 2>&1 ) + code=$? + printf '── %s (exit %s)\n%s\n\n' "$desc" "$code" "$out" + if printf '%s' "$out" | grep -q 'Traceback (most recent call last)'; then + echo "::error::$desc: traceback instead of a redirect" + failed=1 + fi + if ! printf '%s' "$out" | grep -qiE "$pattern"; then + echo "::error::$desc: must name the replacement command (/$pattern/)" + failed=1 + fi + } + expect_redirect "download -t division_area" "botmap boundary|boundary " \ + uv run botmap download -t division_area --bbox "$SMOKE_BBOX" -f geojsonseq + expect_redirect "download -t infrastructure for transit stops" "places --category bus_stop" \ + uv run botmap download -t infrastructure --bbox "$SMOKE_BBOX" \ + --where class=bus_stop -f geojsonseq + expect_redirect "categories on a non-place type" "schema|--class" \ + uv run botmap categories -t land_use --bbox "$SMOKE_BBOX" + exit "$failed" + + - name: Integration tests (network) + run: | + set -uo pipefail + source ./retry.sh + retry 2 uv run pytest tests/ -v -m integration + + rollup-test-status: + name: Check test results + if: always() + needs: [unit, agent-contract, live-smoke] + runs-on: ubuntu-latest + permissions: {} + steps: + - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3 + with: + jobs: ${{ toJSON(needs) }} +Iteration 4: New subsample score 1.5013390666283426 is not better than old score 1.6613027101738231, skipping +Iteration 5: Selected program 1 score: 0.479827106072882 +Iteration 5: Proposed new text for .github/workflows/test-run.yml: name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read # required to checkout the code from the repo + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Unit tests (py${{ matrix.python-version }}) + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: uv sync --dev + + # Unit tests only: fast, hermetic, no S3. The networked suite runs once + # in the `integration` job rather than 4x across the matrix. + - name: Run unit tests + run: uv run pytest tests/ -m "not integration" -v + + # Offline discovery smoke test. If an assistant cannot enumerate the + # verb surface, it falls back to `download` — the worst failure mode in + # this system — so a broken manifest must fail the build, not the eval. + - name: Discovery surface smoke test (offline) + run: | + uv run botmap --help > /dev/null + uv run botmap --json capabilities > capabilities.json + uv run botmap --json themes > /dev/null + uv run botmap --json types > /dev/null + uv run python - <<'PY' + import json, sys + + manifest = json.load(open("capabilities.json")) + names = {c["name"] for c in manifest["commands"]} + + # Every verb an assistant is expected to find on its own, plus the + # discovery commands the bundled Skill tells it to reach for. + required = { + "where", "boundary", "count", "sample", + "places", "buildings", "roads", "addresses", "water", "landuse", + "at", "containing", + "themes", "types", "schema", "categories", "capabilities", + "download", "install-skill", + } + missing = sorted(required - names) + if missing: + sys.exit(f"capabilities manifest is missing verbs: {missing}") + + # Each command must carry help text; an undocumented verb is an + # undiscoverable verb. + undocumented = sorted( + c["name"] for c in manifest["commands"] if not (c.get("help") or "").strip() + ) + if undocumented: + sys.exit(f"commands with no help text: {undocumented}") + + print(f"OK: {len(names)} commands advertised, all required verbs present.") + PY + + # The Skill is the assistant's de-facto documentation. If it drifts out + # of lockstep with the CLI surface, new affordances become invisible. + - name: Skill / CLI lockstep check (offline) + run: | + uv run python - <<'PY' + import json, re, subprocess, sys + from importlib import resources + + skill = (resources.files("botmap") / "data" / "skill.md").read_text() + manifest = json.loads( + subprocess.run( + ["botmap", "--json", "capabilities"], + capture_output=True, text=True, check=True, + ).stdout + ) + names = {c["name"] for c in manifest["commands"]} + + # Verbs that exist but are never mentioned in the Skill will not be + # used by an assistant, no matter how good they are. + unmentioned = sorted( + n for n in names + if n not in {"download", "gers", "releases", "changelog", "cache", + "install-skill", "capabilities"} + and not re.search(rf"\b{re.escape(n)}\b", skill) + ) + if unmentioned: + sys.exit( + "these verbs are absent from botmap/data/skill.md and so are " + f"undiscoverable to agents: {unmentioned}" + ) + print("OK: every convenience verb is documented in the Skill.") + PY + + integration: + name: Integration + agent-behaviour smoke tests + runs-on: ubuntu-latest + needs: [test] + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: true + python-version: "3.12" + + - name: Install dependencies + run: uv sync --dev + + - name: Cache divisions index + uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 # v4.2.3 + with: + path: ~/.cache/botmap + key: botmap-divisions-${{ runner.os }}-${{ hashFiles('botmap/cache.py') }} + restore-keys: | + botmap-divisions-${{ runner.os }}- + + - name: Run networked tests + run: uv run pytest tests/ -m integration -v + + # Preserved from the original workflow: the low-level escape hatch must + # keep working byte-for-byte. + - name: CLI smoke test (download escape hatch) + run: uv run botmap download --bbox=-71.068,42.353,-71.058,42.363 -f geojson --type=building -o boston.geojson + + # The question-shaped front door must work end to end, since that is the + # path an assistant is scored on. + - name: Verb smoke test (question-shaped path) + run: | + set -euo pipefail + uv run botmap --json where "Cambridge, MA" | tee where.json + uv run botmap --json count -t building --in "Cambridge, MA" | tee count.json + uv run botmap places --bbox=-71.068,42.353,-71.058,42.363 -n 5 -f geojsonseq -o pois.jsonl + uv run botmap boundary "Malta" > malta.geojson + uv run botmap --json containing 42.3601,-71.0589 > containing.json + uv run python - <<'PY' + import json, sys + + count = json.load(open("count.json"))["count"] + if count <= 0: + sys.exit("count -t building --in 'Cambridge, MA' returned 0 — " + "either the query path or the divisions index is broken") + + feature = json.load(open("malta.geojson")) + if feature.get("type") != "Feature" or not feature.get("geometry"): + sys.exit("boundary 'Malta' did not emit a GeoJSON Feature with geometry") + + if not json.load(open("containing.json")): + sys.exit("containing 42.3601,-71.0589 returned no divisions") + + rows = [l for l in open("pois.jsonl") if l.strip()] + if not rows: + sys.exit("places --bbox returned no features for downtown Boston") + + print(f"OK: count={count}, {len(rows)} POIs, boundary + containing non-empty.") + PY + + # ------------------------------------------------------------------ + # Zero-result accountability guard. + # + # An unexplained "0" is the worst failure mode in this system: the + # assistant reads it as "there are none here" and confidently reports a + # wrong answer (see the bus-stops-in-Cambridge regression). Any command + # that yields zero rows MUST also emit a stderr explanation naming the + # likely cause and a ready-to-run follow-up command. + # + # This step is advisory today (continue-on-error) so it reports the gap + # loudly in the build log without blocking unrelated changes. Flip + # continue-on-error to false once `count`, `places` and the other verbs + # all explain their empty results. + # ------------------------------------------------------------------ + - name: Zero-result must be explained (advisory) + continue-on-error: true + run: | + uv run python - <<'PY' + import subprocess, sys + + HINT_TOKENS = ( + "0 rows", "no rows", "did you mean", "not present", + "categories", "botmap ", # a suggested follow-up command + ) + + CASES = [ + # (argv, human description) + (["--json", "count", "-t", "place", "--in", "Cambridge, MA", + "--where", "categories.primary=bus_stop"], + "count of a plausible-but-possibly-absent category"), + (["--json", "count", "-t", "place", "--in", "Cambridge, MA", + "--where", "categories.primary=definitely_not_a_category"], + "count with a bogus category value"), + (["places", "--bbox", "-71.068,42.353,-71.058,42.363", + "--category", "definitely_not_a_category", + "-f", "geojsonseq"], + "places with a bogus category value"), + ] + + failures = [] + for argv, desc in CASES: + proc = subprocess.run(["botmap", *argv], capture_output=True, text=True) + out, err = proc.stdout, proc.stderr + zero = ('"count": 0' in out) or (argv[0] == "places" and not out.strip()) + if not zero: + print(f"[ok] {desc}: returned rows, nothing to explain") + continue + explained = any(tok in err.lower() for tok in + (t.lower() for t in HINT_TOKENS)) + if explained: + print(f"[ok] {desc}: zero rows WITH explanation on stderr") + else: + print(f"[GAP] {desc}: zero rows and SILENT stderr") + print(f" cmd: botmap {' '.join(argv)}") + failures.append(desc) + + if failures: + print() + print("Unexplained zero results found. An assistant reads these as") + print("'there are none here' and reports a wrong answer. Each empty") + print("result should name the probable cause and print a ready-to-run") + print("replacement command (e.g. `botmap categories -t place --in ...`).") + sys.exit(1) + print("OK: every empty result explained itself.") + PY + + # Wrong first tries should become correct second tries: errors must name + # the problem AND print a runnable replacement command. + - name: Errors must suggest a replacement command + run: | + uv run python - <<'PY' + import subprocess, sys + + CASES = [ + (["download", "-t", "division_area", "--in", "Malta", + "-f", "geojsonseq"], "boundary"), + (["download", "-t", "infrastructure", "--in", "Cambridge, MA", + "--where", "class=bus_stop", "-f", "geojsonseq"], "places"), + (["categories", "-t", "land_use", + "--bbox", "-71.07,42.35,-71.06,42.36"], "landuse"), + ] + + problems = [] + for argv, expected_verb in CASES: + proc = subprocess.run(["botmap", *argv], capture_output=True, text=True) + blob = (proc.stdout + proc.stderr) + if "Traceback (most recent call last)" in blob: + problems.append(f"traceback from: botmap {' '.join(argv)}") + continue + if proc.returncode == 0: + problems.append(f"expected a redirect error: botmap {' '.join(argv)}") + continue + if expected_verb not in blob: + problems.append( + f"error for `botmap {' '.join(argv)}` never names " + f"`{expected_verb}` as the replacement" + ) + else: + print(f"[ok] botmap {' '.join(argv)} -> redirected to {expected_verb}") + + if problems: + for p in problems: + print(f"[FAIL] {p}") + sys.exit(1) + print("OK: every wrong first try names a runnable replacement.") + PY + + rollup-test-status: + name: Check test results + if: always() + needs: [test, integration] + runs-on: ubuntu-latest + permissions: {} + steps: + - uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3 + with: + jobs: ${{ toJSON(needs) }} +Iteration 5: New subsample score 1.9254196795427199 is not better than old score 1.9707663987699073, skipping +Iteration 6: Selected program 0 score: 0.5764396869574474 +Iteration 6: Proposed new text for .gitignore: # Adapted from https://github.com/github/gitignore/blob/main/Python.gitignore +# +# Conventions used in this file: +# * Build/output directories are ANCHORED to the repo root ("/build/" not +# "build/") so an unanchored pattern can never silently swallow a package +# directory, a docs folder, or a test fixture with the same name. An +# accidentally-ignored source file is the worst outcome for this repo: +# `botmap/cli.py` and `botmap/data/skill.md` are the tool's contract with +# the agents that use it. +# * Artifacts that the CLI's own documented examples write into the current +# working directory (GeoJSON / JSONL / Parquet / .state sidecars) are +# ignored, with explicit re-includes for the fixtures and examples that +# ARE tracked. Running the README recipes or `just smoke-test` must never +# leave the working tree dirty. + +# --------------------------------------------------------------------------- +# Blocked work — files needed to fix the current eval failures +# +# The two scored regressions cannot be fixed from this file: +# 1. `count ... --category bicycle_parking` returns 0 with no explanation +# (Class C, "silent wrong"). The zero-result explainer currently lives +# inline in the `places` command in cli.py and is not reachable from +# `count`, `sample`, `roads`, `water`, `landuse`, or `addresses`. +# 2. `where "Reykjavik, Iceland"` exits 1 because the divisions index stores +# "Reykjavík" (diacritic) and there is no folding/transliteration step. +# +# Requesting the modules those fixes belong in (neither exists today): +NEW FILE NEEDED: botmap/zero_results.py - shared "why did this return 0 rows?" explainer so count/sample/roads/water/landuse/addresses get the same near-match + probe suggestions that places already has, instead of an unexplained zero +NEW FILE NEEDED: botmap/placenames.py - diacritic folding, transliteration, and endonym aliases (Reykjavik->Reykjavík, Tokyo->東京都, Zurich->Zürich) so place-name resolution stops hard-failing on the ASCII spelling an agent will type +# --------------------------------------------------------------------------- + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging (anchored: never shadow a package directory) +.Python +/build/ +/develop-eggs/ +/dist/ +/downloads/ +/eggs/ +/.eggs/ +/lib/ +/lib64/ +/parts/ +/sdist/ +/var/ +/wheels/ +/share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +/.cache/ +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +/cover/ + +# Translations +*.mo +*.pot + +# Logs (agent/eval/CLI chatter). Tracked fixtures are re-included below. +*.log +!tests/**/*.log + +# Django stuff: +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +/instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +/target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# Benchmark results (machine-specific) +/results/ + +# macOS +.DS_Store + +# --------------------------------------------------------------------------- +# botmap output artifacts +# +# Every README / skill.md recipe and the CI smoke test write map data into the +# current working directory (boston.geojson, brooklyn_coffee.jsonl, +# tall.parquet, county.geojson, plus the `.state` sidecar written next to any +# `-o` target). Ignore those so a doc walkthrough or an agent run never shows +# up as an uncommitted change and never gets committed by accident. +# --------------------------------------------------------------------------- +*.geojson +*.geojsonl +*.geojsonseq +*.jsonl +*.parquet +*.state +*.gpkg +*.fgb + +# ...but these are real, tracked repository content: +!tests/** +!benchmarks/** +!botmap/examples/** +!docs/** + +# Divisions index / cache, if XDG_CACHE_HOME is ever pointed inside the repo +.cache/botmap/ +divisions-index-*.parquet + +# Skill installed project-scope by `botmap install-skill` during agent runs. +# (AGENTS.md is deliberately NOT ignored — a project may want to track the +# generated section so agents pick the CLI up from the repo itself.) +.claude/skills/botmap/ + +# Agent-usability eval artifacts +evals/runs/ +evals/report.md +evals/proposals.json +Iteration 6: Accepted candidate (subsample score 1.7127614091892995 -> 1.768794883222766); running full eval. +Iteration 6: Found a better program on the valset with score 0.582437538068437. +Iteration 6: Valset score for new program: 0.582437538068437 (coverage 5 / 5) +Iteration 6: Val aggregate for new program: 0.582437538068437 +Iteration 6: Individual valset scores for new program: {0: 0.36131347438921657, 1: 0.4313927656183124, 2: 0.7031447429783426, 3: 0.768548135045642, 4: 0.6477885723106716} +Iteration 6: New valset pareto front scores: {0: 0.36131347438921657, 1: 0.5852731858971623, 2: 0.8157275694683133, 3: 0.8279580379044169, 4: 0.7037612803793193} +Iteration 6: Valset pareto front aggregate score: 0.6588067096076856 +Iteration 6: Updated valset pareto front programs: {0: {2}, 1: {0}, 2: {0}, 3: {0}, 4: {1}} +Iteration 6: Best valset aggregate score so far: 0.582437538068437 +Iteration 6: Best program as per aggregate score on valset: 2 +Iteration 6: Best score on valset: 0.582437538068437 +Iteration 6: Linear pareto front program index: 2 +Iteration 6: New program candidate index: 2 +Iteration 7: Selected program 0 score: 0.5764396869574474 +Iteration 7: Proposed new text for CODEOWNERS: # CODEOWNERS — review routing for botmap +# +# botmap's primary user is an AI assistant that is handed a plain-English +# question about maps and nothing else. Every file below is part of the +# surface that assistant sees. Changes here are behaviour changes for that +# assistant, so they get named owners and a hard review checklist. +# +# --------------------------------------------------------------------------- +# AGENT-FACING INVARIANTS — reviewers MUST block any PR that violates these +# --------------------------------------------------------------------------- +# 1. No unexplained empty result. Zero rows must always be accompanied by a +# stderr sentence saying WHY (wrong category value, place resolved to the +# wrong region, bbox outside coverage) plus a concrete next command. An +# assistant reads bare "0" as "there are none" and reports a wrong answer. +# This is the worst failure mode in the system. +# 2. No raw Python traceback ever reaches the user. Network/S3/urllib +# failures (DNS, timeout, offline, 403) must be caught and re-emitted as +# a one-line diagnosis + retry/offline advice. Observed regression: +# `where "Brooklyn, NY"` dumping urllib.request internals on a network +# blip, which the eval scored as a hard failure three times in a row. +# 3. Unknown subcommand must suggest the closest real one. Observed +# regression: `botmap building_parts --in "Cambridge, MA"` exiting 2 with +# "No such command" and no pointer to `download -t building_part` / +# `buildings`. Every "No such command" path must name a runnable +# replacement. +# 4. Unresolvable place names must not dead-end. `where "Reykjavik, Iceland"` +# returning no_match with only generic advice was scored a hard failure in +# both repeats. A no-match must (a) retry with qualifiers dropped and with +# country-name -> alpha-2 normalisation, (b) offer local-script/alternate +# spellings, and (c) print a ready-to-run `--bbox` or `containing LAT,LON` +# fallback with real numbers where one can be derived. +# 5. Accept the obvious spelling as well as the official one: singular and +# plural verbs, underscores and hyphens, `--type`/`-t` values with or +# without the theme prefix. Aliases are cheap; a wrong first try that +# cannot become a right second try is not. +# 6. Every error message names the problem AND gives a copy-pasteable +# replacement command. "See --help" is not a replacement command. +# 7. stdout is data, stderr is for the human/agent. No diagnostics on stdout. +# 8. New capability is not shipped until it is discoverable: `capabilities`, +# `--help`, README, and botmap/data/skill.md must be updated in the same +# PR, or an assistant will never find it. +# +# --------------------------------------------------------------------------- +# Ownership +# --------------------------------------------------------------------------- + +# Default owners for everything in the repo +* @overturemaps/omf-public-reviewers + +# GitHub Actions, workflows, and repo configuration +/.github/** @lowlydba @overturemaps/omf-public-reviewers + +# --- Command surface: what the assistant can discover and run --------------- +# Verb names, aliases, unknown-command suggestions, error text, zero-result +# hints, and the `capabilities` manifest all live here. Review against +# invariants 1, 3, 5, 6, 7, 8. +/botmap/cli.py @overturemaps/omf-public-reviewers +/botmap/intents.py @overturemaps/omf-public-reviewers +/botmap/introspection.py @overturemaps/omf-public-reviewers + +# --- Place-name resolution ------------------------------------------------- +# Qualifier normalisation, country/state aliases, parent fallback, ambiguity +# warnings. Review against invariants 1 and 4. +/botmap/geocoding.py @overturemaps/omf-public-reviewers +/botmap/cache.py @overturemaps/omf-public-reviewers + +# --- Filters --------------------------------------------------------------- +# --where parsing and schema validation. Errors must explain the shell +# redirection trap and list available fields. Review against invariant 6. +/botmap/filters.py @overturemaps/omf-public-reviewers + +# --- Network / data access ------------------------------------------------- +# STAC catalog, S3 reads, GERS lookup. Any exception escaping this layer as a +# traceback is a blocking review comment. Review against invariant 2. +/botmap/core.py @overturemaps/omf-public-reviewers +/botmap/changelog.py @overturemaps/omf-public-reviewers +/botmap/releases.py @overturemaps/omf-public-reviewers + +# --- Agent documentation shipped with the package -------------------------- +# skill.md is the assistant's de-facto manual; it must be updated in lockstep +# with cli.py. A new verb with no skill.md recipe is invisible. +/botmap/data/skill.md @overturemaps/omf-public-reviewers +/botmap/skill_installer.py @overturemaps/omf-public-reviewers +/README.md @overturemaps/omf-public-reviewers +/SPEC.md @overturemaps/omf-public-reviewers + +# --- Regression guards for the failures above ------------------------------ +# Any PR touching cli.py, geocoding.py, or core.py should add or update a test +# here proving the new path yields a named problem + runnable replacement. +/tests/** @overturemaps/omf-public-reviewers +/docs/automated-improvements/** @overturemaps/omf-public-reviewers + +# --------------------------------------------------------------------------- +# Files I need in order to fix the eval failures properly, rather than +# cramming this logic into cli.py: +# +# NEW FILE NEEDED: botmap/suggest.py - unknown-subcommand and unknown-verb suggestion plus a verb/type alias table (building_parts -> building_part, plural/singular, hyphen/underscore); this does not belong inline in cli.py +# NEW FILE NEEDED: botmap/errors.py - one place to turn network/S3/urllib exceptions into a one-line diagnosis + retry advice so no traceback ever reaches the user +# NEW FILE NEEDED: botmap/placenames.py - country/city name normalisation and local-script fallbacks (Reykjavik -> Reykjavík, "X, Iceland" -> "X, IS") kept out of geocoding.py's index logic +# --------------------------------------------------------------------------- +Iteration 7: Accepted candidate (subsample score 0.7087533998980424 -> 1.2375917862387258); running full eval. +Iteration 7: Valset score for new program: 0.5093691116655419 (coverage 5 / 5) +Iteration 7: Val aggregate for new program: 0.5093691116655419 +Iteration 7: Individual valset scores for new program: {0: 0.37446972543120066, 1: 0.5993198537419527, 2: 0.0, 3: 0.8238301004281922, 4: 0.7492258787263637} +Iteration 7: New valset pareto front scores: {0: 0.37446972543120066, 1: 0.5993198537419527, 2: 0.8157275694683133, 3: 0.8279580379044169, 4: 0.7492258787263637} +Iteration 7: Valset pareto front aggregate score: 0.6733402130544495 +Iteration 7: Updated valset pareto front programs: {0: {3}, 1: {3}, 2: {0}, 3: {0}, 4: {3}} +Iteration 7: Best valset aggregate score so far: 0.582437538068437 +Iteration 7: Best program as per aggregate score on valset: 2 +Iteration 7: Best score on valset: 0.582437538068437 +Iteration 7: Linear pareto front program index: 2 +Iteration 7: New program candidate index: 3 diff --git a/experiments/runs/tool-3009509-1787550419/gepa/run_log_stderr.txt b/experiments/runs/tool-3009509-1787550419/gepa/run_log_stderr.txt new file mode 100644 index 0000000000000000000000000000000000000000..90aa2692af3118230147d7fed012293df219022d --- /dev/null +++ b/experiments/runs/tool-3009509-1787550419/gepa/run_log_stderr.txt @@ -0,0 +1,17 @@ + GEPA Optimization: 0%| | 0/60 [00:00Reykjav\u00edk, Tokyo->\u6771\u4eac\u90fd, Zurich->Z\u00fcrich) so place-name resolution stops hard-failing on the ASCII spelling an agent will type", + "botmap/suggest.py": "unknown-subcommand and unknown-verb suggestion plus a verb/type alias table (building_parts -> building_part, plural/singular, hyphen/underscore); this does not belong inline in cli.py" + }, + "files": [ + ".github/dependabot.yml", + ".github/workflows/build-binaries.yml", + ".github/workflows/publish-pypi.yml", + ".github/workflows/test-run.yml", + ".gitignore", + "CODEOWNERS", + "LICENSE", + "README.md", + "SPEC.md", + "benchmarks/bench_count_rows.py", + "benchmarks/bench_geojson_writer.py", + "botmap/__init__.py", + "botmap/__main__.py", + "botmap/cache.py", + "botmap/changelog.py", + "botmap/cli.py", + "botmap/core.py", + "botmap/data/__init__.py", + "botmap/data/skill.md", + "botmap/examples/geopandas_example.ipynb", + "botmap/filters.py", + "botmap/geocoding.py", + "botmap/intents.py", + "botmap/introspection.py", + "botmap/models.py", + "botmap/releases.py", + "botmap/skill_installer.py", + "botmap/state.py", + "botmap/writers.py", + "designing_cli_interfaces_for_data_products.md", + "docs/automated-improvements/progress_summary.md", + "docs/automated-improvements/report-example-01.md", + "docs/automated-improvements/report-example-02.md", + "docs/automated-improvements/report-example-03.md", + "docs/superpowers/plans/2026-05-11-agent-friendly-cli.md", + "docs/superpowers/plans/2026-05-28-agent-usability-eval.md", + "docs/superpowers/specs/2026-05-11-agent-friendly-cli-design.md", + "docs/superpowers/specs/2026-05-28-agent-usability-eval-design.md", + "justfile", + "pyproject.toml", + "pytest.ini", + "tests/__init__.py", + "tests/test_cache.py", + "tests/test_cache_integration.py", + "tests/test_changelog.py", + "tests/test_cli_at.py", + "tests/test_cli_cache.py", + "tests/test_cli_capabilities.py", + "tests/test_cli_categories.py", + "tests/test_cli_containing.py", + "tests/test_cli_count.py", + "tests/test_cli_download.py", + "tests/test_cli_gers.py", + "tests/test_cli_install_skill.py", + "tests/test_cli_integration.py", + "tests/test_cli_intents_addresses.py", + "tests/test_cli_intents_buildings.py", + "tests/test_cli_intents_landuse.py", + "tests/test_cli_intents_places.py", + "tests/test_cli_intents_roads.py", + "tests/test_cli_intents_water.py", + "tests/test_cli_introspection.py", + "tests/test_cli_json.py", + "tests/test_cli_releases.py", + "tests/test_cli_sample.py", + "tests/test_cli_schema.py", + "tests/test_cli_verb_limit.py", + "tests/test_cli_where.py", + "tests/test_copy.py", + "tests/test_core.py", + "tests/test_filters.py", + "tests/test_geocoding.py", + "tests/test_gers.py", + "tests/test_intents.py", + "tests/test_introspection.py", + "tests/test_main.py", + "tests/test_models.py", + "tests/test_releases.py", + "tests/test_skill_installer.py", + "tests/test_skill_resource.py", + "tests/test_state.py", + "tests/test_writers.py", + "uv.lock" + ], + "files_changed": [ + ".gitignore" + ], + "sha": "3009509", + "release_requested": null, + "pinned": false, + "correctness_impl": "agenteval-v2", + "agent_path": "subscription", + "agent_provider": "anthropic-subscription", + "agent_model": "sonnet", + "proposer": "openrouter/anthropic/claude-opus-5", + "budget": 60, + "evaluations_run": 62, + "candidates_tried": 4, + "train_questions": [ + "asian-restaurants-rollup", + "basic-category-rollup", + "malta-highways-absent-class", + "starbucks-name-vs-brand", + "tall-buildings-cambridge", + "tattoo-category-discovery", + "bbox-cambridge", + "hospitals-rhode-island", + "motorways-rhode-island", + "nearest-pois-harvard", + "beach-accessibility-malta", + "bike-parking-coverage", + "building-parts-detail", + "bus-stops-with-coffee", + "junction-density", + "waterfront-buildings-reykjavik", + "brooklyn-every-building", + "bus-stops-cambridge", + "residential-share-cambridge", + "reykjavik-diacritic", + "williamsburg-which-one", + "clipping-polygon-qgis", + "ev-charging-gap", + "hotel-density-two-countries", + "pharmacy-near-address" + ], + "heldout_questions": [ + "street-canonical-form", + "pharmacies-monaco", + "hardware-near-bikepaths", + "unsupported-hours-and-ratings", + "which-admin-areas" + ], + "minutes": 1496.0, + "finished": "2026-08-25T06:42:59.452994+00:00" +} \ No newline at end of file